# Find and confirm a pharmacy branch

Use this when someone needs a specific retail pharmacy branch for a prescription-cost task. Search by ZIP and optional name, confirm the branch even for one result, then selected_option to obtain pharmacy_reference. Starts within 10 miles; include_farther permits up to 25 miles only after agreement. Keep search ZIP separate from home ZIP. Directory selection does not verify hours, preferred-network status or prices. Use compare_plan_drug_costs after selection; do not substitute retail for mail order. Use the app as the answer. Do not repeat its options in a list, table or explanation. Ask one short question if input is required; otherwise stop.

## Tool name

`find_medicare_pharmacies`

## Input schema

```json
{
  "type": "object",
  "properties": {
    "zip": {
      "type": "string",
      "pattern": "^[0-9]{5}$",
      "description": "ZIP near the desired pharmacy. Preserve any separate home ZIP for plan searches."
    },
    "q": {
      "type": "string",
      "minLength": 2,
      "maxLength": 100,
      "description": "Optional pharmacy or chain name. Omit to browse nearby pharmacies."
    },
    "county": {
      "type": "string",
      "description": "Previously confirmed county for the search ZIP; omit if unknown."
    },
    "state": {
      "type": "string",
      "pattern": "^[A-Z]{2}$",
      "description": "State returned by the county lookup."
    },
    "include_farther": {
      "type": "boolean",
      "default": false,
      "description": "True only after the person agrees to include options up to 25 miles away. Otherwise show only results estimated within 10 miles."
    },
    "selected_option": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Returned option_id after the person selects the specific branch. Keep the original search context. Never ask the person for this ID."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "default": 10,
      "description": "Maximum displayed results, from 1 to 10 (default 10)."
    }
  },
  "required": [
    "zip"
  ],
  "additionalProperties": false
}
```

## Example request

Minimal synthetic request after initialization. A missing-input clarification is a valid result; do not invent personal facts to complete it. For content retrieval, replace the illustrative fixture ID with an ID returned by search.

```json
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "find_medicare_pharmacies",
    "arguments": {
      "zip": "60614"
    }
  }
}
```

## Connection

POST JSON-RPC to https://tools.thepocketprotector.com/mcp with method `tools/call`, name `find_medicare_pharmacies`, and arguments matching the schema above. Call `tools/list` to verify deployed availability.

## Results and errors

Read both `content` and `structuredContent`. Follow returned clarification or continuation steps. Preserve source attribution, dates, uncertainty and scope. `isError: true` means the lookup did not complete. HTTP 429 requires waiting for `Retry-After`; never repeatedly retry an unavailable lookup.

## Tool annotations

```json
{
  "title": "Find and confirm a pharmacy branch",
  "readOnlyHint": true,
  "openWorldHint": true,
  "destructiveHint": false
}
```

Authentication: public, no account or API key required. Public tools perform no enrollment or account writes.
