Skip to main content
Glama
cliwant

mcp-sam-gov

cms_medicare_provider_services

Read-only

Query Medicare Part-B provider utilization by NPI or state to retrieve services, beneficiaries, and payment amounts. Filter by provider type or HCPCS code for targeted analysis.

Instructions

Medicare Part-B provider utilization — HCPCS services rendered, beneficiaries served, and submitted / Medicare-allowed / Medicare-paid amounts (CMS 'Medicare Physician & Other Practitioners — by Provider and Service', keyless; data.cms.gov data-API). Input: npi (10-digit) OR state (2-letter) — at least ONE is REQUIRED (the table is 9.78M rows; an all-empty query is refused; providerType/hcpcsCode alone are NOT enough to scope). Optional providerType (exact CMS specialty, e.g. 'Family Practice'), hcpcsCode (e.g. '97110'), size (1–100, def 25), offset. Returns { services:[{ npi, providerName, credentials, providerType, city, state, zip, hcpcsCode, hcpcsDescription, totalBeneficiaries, totalServices, avgSubmittedCharge, avgMedicareAllowed, avgMedicarePayment }] } + honest _meta. ★HONESTY: totalAvailable is the EXACT count from a SEPARATE stats sub-query (…/data-viewer/stats → found_rows); if that count fails, totalAvailable is null + a disclosing note (never length-faked). hasMore = offset+returned < total. Aggregate/payment values: numeric-string → number|null (genuine 0 stays 0, absent → null, never 0-faked); NPI/HCPCS/names are null-never-empty-string. Genuine no-match → honest empty; 4xx → invalid_input/not_found; 5xx → THROWS; 200 non-array/non-JSON → schema_drift. PUBLIC PROVIDER-LEVEL AGGREGATE figures (no patient identifiers) for ONE annual vintage (dataset year disclosed in _meta) — utilization snapshot, NOT a fraud/quality/fitness determination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
npiNoA 10-digit National Provider Identifier (→ Rndrng_NPI), e.g. '1003000126'. Provide at least this OR `state`. Validated ^\d{10}$.
sizeNoMax provider-service rows to return (1–100, default 25). Offset-paginated.
stateNoA 2-letter US state/territory code (→ Rndrng_Prvdr_State_Abrvtn), e.g. 'VA', 'CA'. Provide at least this OR `npi`. Validated ^[A-Za-z]{2}$.
offsetNoRow offset for pagination (default 0). Page with _meta.pagination.nextOffset.
hcpcsCodeNoAn optional HCPCS/CPT service code filter (→ HCPCS_Cd), e.g. '97110', 'G0463'. Validated ^[A-Za-z0-9]{1,10}$.
providerTypeNoAn optional specialty filter matching the CMS provider type EXACTLY (→ Rndrng_Prvdr_Type), e.g. 'Family Practice', 'Physical Therapist in Private Practice'. Allowed: letters/digits/space/& . , ( ) / ' - (≤100 chars).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnlyHint annotation, the description discloses extensive behavioral details: the honesty policy for totalAvailable (separate stats query, null with note on failure), hasMore logic, numeric-string conversion rules (genuine 0 stays 0, absent → null), null handling for identifiers, error handling (4xx/5xx/schema_drift), and dataset vintage disclosure. This exceeds what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Despite its length, every sentence adds value: purpose, input requirements, optional filters, return format, honesty guarantees, and scope. The structure is logical, front-loading the core purpose and requirements before diving into details. No redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With six parameters, no output schema, and no nested objects, the description compensates by fully specifying the return shape, pagination fields, error semantics, and data scope. It covers everything an agent needs to call the tool correctly and interpret results, including edge cases like genuine no-match and schema drift.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds critical semantic context not in the schema: the mandatory npi-or-state constraint with rationale (9.78M rows), the exact-match requirement for providerType, and the pagination behavior via offset and size. It also explains that providerType/hcpcsCode alone cannot scope the query, which the schema does not convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: retrieving Medicare Part-B provider utilization data with specific metrics (services, beneficiaries, amounts). It distinguishes itself from generic CMS data tools by naming the exact dataset and emphasizing provider-level aggregates. The scope is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit input requirements (npi or state required, providerType/hcpcsCode alone insufficient) and clarifies what the tool is not (fraud/quality/fitness determination). However, it does not explicitly name alternative tools or state when to prefer this over siblings like cms_query_dataset, leaving some selection inference to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools