Skip to content
The Pocket ProtectorDevelopersVisit TPP ↗

MCP reference

Compare Medicare plans across years

Use this when someone asks what changes between selected MA or Part D plans in two coverage years. Combines published plan details, selected doctor/medication evidence and available prescription estimates; alternatives use the rankers only when include_alternatives=true. Confirm both plans independently: there is no authoritative renewal crosswalk. Missing next-year data is unknown, not discontinuation, lost coverage or no change. Resume annual_context and the indicated selection_for.side during selection; final facts_used.annual_context retains inputs whose care selections must be revalidated. Preserve sources, before/after values and pricing limits. No stay/switch verdict, deadline decision, enrollment or Medigap renewal comparison; nothing is saved. 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_medicare_plan_year_changes

Input schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "zip": {
      "type": "string",
      "pattern": "^\\d{5}$",
      "description": "Five-digit home ZIP for plan availability; keep it separate from doctor/pharmacy search ZIPs."
    },
    "county": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60,
      "description": "Confirmed county for this ZIP. Omit if unknown so the tool can ask when ambiguous."
    },
    "state": {
      "type": "string",
      "pattern": "^[A-Z]{2}$",
      "description": "Two-letter state from the confirmed ZIP/county lookup; never guess."
    },
    "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": "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": "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": "User choice: retail, mail_order or no_preference. Do not infer agreement or substitute a retail branch for mail order."
    },
    "from_year": {
      "type": "integer",
      "minimum": 2006,
      "maximum": 2100,
      "description": "Requested starting coverage year; omission uses and discloses the API serving year."
    },
    "to_year": {
      "type": "integer",
      "minimum": 2006,
      "maximum": 2100,
      "description": "Requested comparison year; defaults to the year after from_year. Never silently substitute another year."
    },
    "current": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 2,
          "maxLength": 150
        },
        "plan": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "minLength": 2,
              "maxLength": 150
            },
            "option_id": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "required": [
            "query",
            "option_id"
          ],
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "description": "Starting-year plan’s familiar name or confirmed selection; validated independently from the next-year plan."
    },
    "next": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 2,
          "maxLength": 150
        },
        "plan": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "minLength": 2,
              "maxLength": 150
            },
            "option_id": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "required": [
            "query",
            "option_id"
          ],
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "description": "Comparison-year plan’s familiar name or confirmed selection. Does not establish an authoritative renewal relationship."
    },
    "providers": {
      "maxItems": 10,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "search": {
                "type": "object",
                "properties": {
                  "zip": {
                    "type": "string",
                    "pattern": "^\\d{5}$"
                  },
                  "county": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "state": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "pattern": "^[A-Z]{2}$"
                  },
                  "q": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 60
                  },
                  "specialty": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  },
                  "facility": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "facility_reference": {
                    "type": "object",
                    "properties": {
                      "search": {
                        "type": "object",
                        "properties": {
                          "q": {
                            "type": "string",
                            "minLength": 2,
                            "maxLength": 120
                          },
                          "zip": {
                            "type": "string",
                            "pattern": "^\\d{5}$"
                          },
                          "county": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 60
                          },
                          "state": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$"
                          },
                          "radius": {
                            "default": 25,
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "q",
                          "zip"
                        ],
                        "additionalProperties": false
                      },
                      "organization_id": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "location_id": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "search",
                      "organization_id",
                      "location_id"
                    ],
                    "additionalProperties": false
                  },
                  "pcp_only": {
                    "type": "boolean"
                  },
                  "accepts_medicare_assignment": {
                    "type": "boolean"
                  },
                  "show_offices": {
                    "type": "boolean"
                  },
                  "office_option": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                },
                "required": [
                  "zip"
                ],
                "additionalProperties": false
              },
              "option_id": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "required": [
              "search",
              "option_id"
            ],
            "additionalProperties": false
          },
          {
            "type": "string",
            "minLength": 2,
            "maxLength": 60
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "doctor",
                  "facility"
                ]
              },
              "name": {
                "type": "string",
                "minLength": 2,
                "maxLength": 120
              },
              "office_zip": {
                "type": "string",
                "pattern": "^\\d{5}$"
              },
              "county": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "state": {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "specialty": {
                "type": "string",
                "minLength": 2,
                "maxLength": 100
              },
              "clinic": {
                "type": "string",
                "minLength": 2,
                "maxLength": 120
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "description": "Up to ten doctor/office inputs or confirmed references. Facilities cannot receive doctor-network verdicts."
    },
    "include_alternatives": {
      "type": "boolean",
      "description": "True only when the person requests next-year alternative rankings, not a stay/switch decision."
    }
  },
  "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.

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "compare_medicare_plan_year_changes",
    "arguments": {}
  }
}

Connection

POST JSON-RPC to https://tools.thepocketprotector.com/mcp with method tools/call, name compare_medicare_plan_year_changes, 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

{
  "title": "Compare Medicare plans across years",
  "readOnlyHint": true,
  "openWorldHint": true,
  "destructiveHint": false
}

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

Read this page as Markdown