# Compare Medigap rates and ranked options

Use this when someone wants Medigap premium options or a personalized Medigap ranking. Default mode compares Plan G rates; comparison=ranked supports a selected supported plan_letter, TPP ranking, optional Part D pairing and next-ten pagination. General rates need no demographics and show each company’s published price range, listed by its low end, not a quote; personalized rates require age, gender and an explicit tobacco answer. Ask for missing facts instead of assuming No; general rates omit demographics. Enrollment-window and household answers are reported, not verified eligibility. Preserve source scope, missing rates and ranking order; reuse returned next_page as page with unchanged inputs. Use get_medigap_plan_details for benefits only. For employer-versus-Medicare requests use compare_employer_coverage_with_medicare; it coordinates this ranking with workplace costs and timing. Do not use for MA-versus-Medigap advice, guaranteed quotes or enrollment. An optional website alternative: [TPP’s Medigap Rate Compare](https://thepocketprotector.com/medigap-rates). Offer only when requested; chat can continue. Opens a separate flow without transferring answers. For another tool, use recommend_website_tool. 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

`compare_medigap_options`

## Input schema

```json
{
  "type": "object",
  "properties": {
    "zip": {
      "type": "string",
      "pattern": "^[0-9]{5}$",
      "description": "Required five-digit residential ZIP, as on the website."
    },
    "county": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60,
      "description": "User-selected county from ZIP choices. Omit when unknown; a single county is resolved automatically."
    },
    "state": {
      "type": "string",
      "pattern": "^[A-Z]{2}$",
      "description": "Optional two-letter state code from the selected county, e.g. FL. Convert Florida to FL internally; never guess from a ZIP prefix."
    },
    "plan_year": {
      "description": "Ranked mode only; omit from default Plan G rates. If omitted, use and disclose the API serving year after resolving the home county. Preserve an explicitly selected supported lineup year.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "drugs": {
      "maxItems": 10,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "medication": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  },
                  "option_id": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "query",
                  "option_id"
                ],
                "additionalProperties": false
              },
              {
                "type": "string",
                "minLength": 2,
                "maxLength": 100
              },
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  },
                  "rxcui": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "dosage": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 999
          },
          "days_supply": {
            "anyOf": [
              {
                "type": "number",
                "const": 30
              },
              {
                "type": "number",
                "const": 60
              },
              {
                "type": "number",
                "const": 90
              }
            ]
          }
        },
        "required": [
          "medication"
        ],
        "additionalProperties": false
      },
      "description": "Ranked mode only; omit from default Plan G rates. Up to ten exact medication/refill entries. Use find_medication for choices; collect quantity and days_supply. [] means intentionally omitted."
    },
    "pharmacy": {
      "type": "object",
      "properties": {
        "search": {
          "type": "object",
          "properties": {
            "zip": {
              "type": "string",
              "pattern": "^\\d{5}$"
            },
            "q": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            },
            "county": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            },
            "state": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            "include_farther": {
              "default": false,
              "type": "boolean"
            }
          },
          "required": [
            "zip"
          ],
          "additionalProperties": false
        },
        "option_id": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "search",
        "option_id"
      ],
      "additionalProperties": false,
      "description": "Ranked mode only; omit from default Plan G rates. Confirmed pharmacy_reference from find_medicare_pharmacies, not a guessed branch or bare identifier."
    },
    "pharmacy_preference": {
      "type": "string",
      "enum": [
        "retail",
        "mail_order",
        "no_preference"
      ],
      "description": "Ranked mode only; omit from default Plan G rates. User choice: retail, mail_order or no_preference. Do not infer agreement or substitute a retail branch for mail order."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10,
      "default": 10,
      "description": "Maximum displayed options in general, personalized or ranked mode, from 1 to 10 (default 10)."
    },
    "comparison": {
      "type": "string",
      "const": "ranked",
      "description": "Omit for default Plan G rate listings. The only explicit value is ranked, for a supported letter, TPP ranking, optional Part D pairing and pagination."
    },
    "plan_letter": {
      "type": "string",
      "pattern": "^(?:[ABCDFGKLMN]|HD[FG]|MA_CORE|MA_SUPP1A|MN_BASIC|MN_EXT_BASIC)$",
      "description": "Ranked mode only; omit from default Plan G rates. Selected supported Medigap letter for comparison=ranked. Do not substitute Plan G for another requested letter."
    },
    "personalization": {
      "type": "string",
      "enum": [
        "general",
        "personalized"
      ],
      "description": "User choice: general means skip personalization; personalized uses age and gender. Omit to ask the user, or when supplying their age/gender already establishes personalized intent."
    },
    "age": {
      "type": "integer",
      "minimum": 64,
      "maximum": 99,
      "description": "Age for personalization, matching website input limits. Required with gender for personalized rates."
    },
    "gender": {
      "type": "string",
      "enum": [
        "Male",
        "Female"
      ],
      "description": "Gender used for the rate search, matching the website choices. Required with age for personalized rates."
    },
    "tobacco_use": {
      "type": "string",
      "enum": [
        "Yes",
        "No"
      ],
      "description": "Required before personalized pricing; ask Yes or No when missing. General rates omit demographics. Never infer a tobacco answer."
    },
    "gi_status": {
      "type": "string",
      "enum": [
        "yes",
        "no",
        "not_sure",
        "skip"
      ],
      "description": "Optional answer to: Are you in your Medigap Open Enrollment or Guaranteed Issue window? No/not sure uses the website underwriting estimate; skip keeps the standard basis. Never infer the answer."
    },
    "household_qualified": {
      "type": "string",
      "enum": [
        "yes",
        "no",
        "not_sure",
        "skip"
      ],
      "description": "Optional answer to: Do you live with a spouse or another adult age 60+ who also has or is applying for Medigap? Only yes enables possible household discount display; eligibility is not confirmed."
    },
    "page": {
      "type": "object",
      "properties": {
        "offset": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "fingerprint": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      },
      "required": [
        "offset",
        "fingerprint"
      ],
      "additionalProperties": false,
      "description": "Ranked mode only; omit from default Plan G rates. Opaque next_page returned by the ranked Medigap result. Keep all other inputs unchanged; do not invent a page token."
    },
    "sort_by": {
      "type": "string",
      "enum": [
        "premium",
        "location",
        "rating"
      ],
      "default": "premium",
      "description": "Default Plan G rate mode only; omit when comparison=ranked. Website sort choices: lowest displayed premium (default), ZIP match, or rate pricing method. Rating means issue-age/attained-age/community-rated, not an insurer financial rating."
    }
  },
  "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": "compare_medigap_options",
    "arguments": {
      "zip": "60614"
    }
  }
}
```

## Connection

POST JSON-RPC to https://tools.thepocketprotector.com/mcp with method `tools/call`, name `compare_medigap_options`, 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": "Compare Medigap rates and ranked options",
  "readOnlyHint": true,
  "openWorldHint": true,
  "destructiveHint": false
}
```

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