payer_formulary_lookup
Pack: payer-policies · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/payer_formulary_lookup for the schema, then POST the same URL with its arguments for the data.
Which Medicare Part D and Medicare Advantage drug plans list a drug on their formulary, with its tier and whether prior authorization, step therapy or a quantity limit applies. Drug is a brand or ingredient name (Eliquis or apixaban), resolved through RxNorm to every product strength and form, or RxNorm product ids. Optional contract (H0028), plan (H0028-007 or words of the plan name), state and county narrow the plans. Returns each formulary that lists the drug with tier and restriction flags per product, the plans that use it (name, contract, premium, deductible, service area states), a summary of how many formularies restrict it, and the plans in the stated scope whose formulary does not list it. Source: CMS monthly Part D formulary file; every answer carries data_as_of (the date CMS lists on the file) and the contract year, and is as of that date: check Medicare Plan Finder. A drug missing from a formulary is reported as not listed in that formulary, never as not covered. When more formularies match than are returned, truncated is true and coverage gives next_offset; pass it as offset.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
drug | string | yes | Brand or ingredient name, e.g. Eliquis, apixaban, Ozempic, semaglutide, metformin. A brand reaches its branded products; an ingredient reaches every product containing it, generic and branded. Digits are read as RxNorm product ids, comma-separated, e.g. 1364441,1364447 |
contract | string | no | Optional CMS contract id, e.g. H0028 or S5601 |
plan | string | no | Optional plan: CONTRACT-PLAN or CONTRACT-PLAN-SEGMENT (H0028-007, H0028-007-000) or words of the plan name (Humana Gold Plus) |
state | string | no | Optional two-letter state code; keeps plans whose service area includes it |
county | string | no | Optional county name with state (Cook with state IL) or the 5-digit CMS county code; keeps plans serving that county |
limit | number | no | Maximum formularies per page (default 10, max 50). A larger value is cut to 50 and the answer says so in coverage.limit_clamped |
offset | number | no | Optional: formularies to skip, for paging (default 0). Use coverage.next_offset from the previous answer |
plans_per_formulary | number | no | Maximum plans listed under each formulary (default 20, max 200); plan_count always gives the total |
Example call
Arguments
{
"drug": "apixaban",
"state": "IL",
"county": "Cook",
"limit": 2,
"plans_per_formulary": 3
}
curl
curl -X POST https://gateway.pipeworx.io/payer-policies/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"payer_formulary_lookup","arguments":{"drug":"apixaban","state":"IL","county":"Cook","limit":2,"plans_per_formulary":3}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('payer_formulary_lookup', {
"drug": "apixaban",
"state": "IL",
"county": "Cook",
"limit": 2,
"plans_per_formulary": 3
});
More examples
{
"drug": "Ozempic",
"contract": "H0028"
}
Response shape
Always returns: drug, scope, found, data_as_of, contract_year, summary, formularies, plans_not_listing, truncated, coverage, source, cms_terms
| Field | Type | Description |
|---|---|---|
drug | object | How the drug was resolved through RxNorm |
scope | object | |
found | boolean | At least one formulary used by a plan in scope lists the drug |
reason | string | null | |
data_as_of | string | The date CMS lists on the formulary file (YYYY-MM-DD) |
contract_year | string | Contract (plan) year or years the file covers, e.g. 2027 |
cms_published | string | null | |
summary | object | |
formularies | array | |
plans_not_listing | object | |
truncated | boolean | |
coverage | object | |
source | string | |
cms_terms | string | CMS Agreement for Use conditions: as of data_as_of, check Medicare Plan Finder |
reading_the_answer | string |
Full JSON Schema
{
"type": "object",
"properties": {
"drug": {
"type": "object",
"description": "How the drug was resolved through RxNorm",
"properties": {
"input": {
"type": "string"
},
"resolved_as": {
"type": "string",
"enum": [
"brand",
"ingredient",
"rxcui"
]
},
"brand": {
"type": [
"string",
"null"
]
},
"ingredient": {
"type": [
"string",
"null"
]
},
"rxnorm_concept": {
"type": [
"string",
"null"
]
},
"products_searched": {
"type": "number",
"description": "RxNorm product ids (strength and form) looked up in the formulary file"
},
"how_resolved": {
"type": "string"
}
}
},
"scope": {
"type": "object",
"properties": {
"contract": {
"type": [
"string",
"null"
]
},
"plan": {
"type": [
"string",
"null"
]
},
"state": {
"type": [
"string",
"null"
]
},
"county": {
"type": [
"object",
"null"
],
"properties": {
"county_code": {
"type": "string"
},
"county": {
"type": [
"string",
"null"
]
},
"state": {
"type": [
"string",
"null"
]
}
}
},
"plans_in_scope": {
"type": [
"number",
"null"
]
}
}
},
"found": {
"type": "boolean",
"description": "At least one formulary used by a plan in scope lists the drug"
},
"reason": {
"type": [
"string",
"null"
],
"enum": [
"not_listed_in_scope",
"no_products_for_drug",
null
]
},
"data_as_of": {
"type": "string",
"description": "The date CMS lists on the formulary file (YYYY-MM-DD)"
},
"contract_year": {
"type": "string",
"description": "Contract (plan) year or years the file covers, e.g. 2027"
},
"cms_published": {
"type": [
"string",
"null"
]
},
"summary": {
"type": "object",
"properties": {
"formularies_listing": {
"type": "number"
},
"formularies_in_release": {
"type": [
"number",
"null"
]
},
"plans_listing": {
"type": "number"
},
"formularies_with_prior_authorization": {
"type": "number"
},
"formularies_with_step_therapy": {
"type": "number"
},
"formularies_with_quantity_limit": {
"type": "number"
},
"formularies_without_these_restrictions": {
"type": "number"
},
"formularies_by_lowest_tier": {
"type": "object",
"additionalProperties": {
"type": "number"
}
}
}
},
"formularies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"formulary_id": {
"type": "string"
},
"contract_year": {
"type": [
"number",
"null"
]
},
"listed": {
"type": "boolean"
},
"restrictions": {
"type": "object",
"properties": {
"prior_authorization": {
"type": "boolean"
},
"step_therapy": {
"type": "boolean"
},
"quantity_limit": {
"type": "boolean"
}
}
},
"tier_range": {
"type": [
"string",
"null"
]
},
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rxcui": {
"type": "string"
},
"rxnorm_name": {
"type": [
"string",
"null"
]
},
"tier": {
"type": [
"number",
"null"
]
},
"prior_authorization": {
"type": [
"boolean",
"null"
]
},
"step_therapy": {
"type": [
"boolean",
"null"
]
},
"quantity_limit": {
"type": [
"boolean",
"null"
]
},
"quantity_limit_amount": {
"type": [
"number",
"null"
]
},
"quantity_limit_days": {
"type": [
"number",
"null"
]
},
"selected_drug": {
"type": [
"boolean",
"null"
]
}
}
}
},
"plan_count": {
"type": "number"
},
"plans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"plan": {
"type": "string",
"description": "CONTRACT-PLAN-SEGMENT"
},
"plan_name": {
"type": [
"string",
"null"
]
},
"contract_id": {
"type": "string"
},
"contract_name": {
"type": [
"string",
"null"
]
},
"premium": {
"type": [
"number",
"null"
]
},
"deductible": {
"type": [
"number",
"null"
]
},
"special_needs_plan": {
"type": [
"string",
"null"
]
},
"area": {
"type": "object",
"properties": {
"basis": {
"type": [
"string",
"null"
]
},
"states": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"suppressed_on_plan_finder": {
"type": [
"boolean",
"null"
]
}
}
}
}
}
}
},
"plans_not_listing": {
"type": "object",
"properties": {
"count": {
"type": [
"number",
"null"
]
},
"plans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"plan": {
"type": "string"
},
"plan_name": {
"type": [
"string",
"null"
]
},
"formulary_id": {
"type": "string"
}
}
}
},
"meaning": {
"type": "string"
},
"how_to_list": {
"type": [
"string",
"null"
]
}
}
},
"truncated": {
"type": "boolean"
},
"coverage": {
"type": "object",
"properties": {
"matched": {
"type": "number"
},
"returned": {
"type": "number"
},
"offset": {
"type": "number"
},
"limit": {
"type": "number"
},
"limit_max": {
"type": "number"
},
"limit_requested": {
"type": [
"number",
"null"
]
},
"limit_clamped": {
"type": "boolean"
},
"next_offset": {
"type": [
"number",
"null"
]
},
"how_to_get_the_rest": {
"type": [
"string",
"null"
]
},
"plans_per_formulary": {
"type": "number"
},
"formularies_with_plans_cut": {
"type": "number"
},
"plans_cut_how": {
"type": [
"string",
"null"
]
},
"products_matched": {
"type": "number"
},
"products_searched": {
"type": "number"
},
"limit_note": {
"type": [
"string",
"null"
]
}
}
},
"source": {
"type": "string"
},
"cms_terms": {
"type": "string",
"description": "CMS Agreement for Use conditions: as of data_as_of, check Medicare Plan Finder"
},
"reading_the_answer": {
"type": "string"
}
},
"required": [
"drug",
"scope",
"found",
"data_as_of",
"contract_year",
"summary",
"formularies",
"plans_not_listing",
"truncated",
"coverage",
"source",
"cms_terms"
]
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the payer-policies pack
{
"mcpServers": {
"payer-policies": {
"url": "https://gateway.pipeworx.io/payer-policies/mcp"
}
}
}
See Getting Started for client-specific install steps.