Skip to main content
Glama

List one payer's rates for a code across hospitals

list_code_payer_hospitals
Read-only

One payer's rate for a (code_type, code) at each hospital, one row per hospital and billing class/methodology/setting, paginated, rolled up across the payer's plans there. Good for 'which hospital is cheapest for Aetna members'. Defaults/caps page_size at 500; includes total_count. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code_type": "<code_type>",
      "code": "<code>",
      "payer_slug": "<payer_slug>"
    },
    "name": "list_code_payer_hospitals"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
stateNoOptional two-letter USPS state code (e.g. "TX", case-insensitive): only hospitals with a location in that state are counted. A hospital in several states counts in each, so state figures can add up to more than national ones. Empty means every hospital; anything that is not a state code is rejected as INVALID_ARGUMENT.
filterNoKeeps only some of the grouped rows (see group_by). Each field left out matches any value; set a field (even to its *_UNSPECIFIED value, which means 'not filed') to require it. Billing classes are never blended: a facility fee and a professional fee are separate bills.
order_byNoDefaults to AVG_ASC (cheapest average first). STD_DEV_* orders by how widely the payer's rates vary at a hospital, COEFFICIENT_OF_VARIATION_* by that spread relative to the price level (comparable across hospitals); pair those with min_sample_count since thin filings have an artificially low spread. MEDIAN_PCT_*/AVG_PCT_* order by the percentage of billed charges of rows filed under the percent-of-total-billed-charges methodology (dollar-only figures last).
code_typeYesCode system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC.
page_sizeNo
page_tokenNoOpaque next_page_token from a previous response; only valid with the same request fields.
payer_slugYesA payer_slug from list_code_payers, e.g. "aetna".
min_sample_countNoOnly hospitals whose figure has at least this many billing records (sample count lower bound). 0 keeps every hospital; negative is rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / order_by / description
      Previous value: -"Defaults to AVG_ASC (cheapest average first). STD_DEV_* orders by how widely the payer's rates vary at a hospital, COEFFICIENT_OF_VARIATION_* by that spread relative to the price level (comparable across hospitals); pair those with min_sample_count since thin filings have an artificially low spread."New value: +"Defaults to AVG_ASC (cheapest average first). STD_DEV_* orders by how widely the payer's rates vary at a hospital, COEFFICIENT_OF_VARIATION_* by that spread relative to the price level (comparable across hospitals); pair those with min_sample_count since thin filings have an artificially low spread. MEDIAN_PCT_*/AVG_PCT_* order by the percentage of billed charges of rows filed under the percent-of-total-billed-charges methodology (dollar-only figures last)."
    • changedInput schema / properties / order_by / enum
      Previous value: -[
      -  "HOSPITAL_PAYER_RATE_ORDER_UNSPECIFIED",
      -  "AVG_ASC",
      -  "AVG_DESC",
      -  "MIN_ASC",
      -  "MAX_DESC",
      -  "HOSPITAL_NAME",
      -  "MEDIAN_ASC",
      -  "MEDIAN_DESC",
      -  "MIN_DESC",
      -  "MAX_ASC",
      -  "STD_DEV_ASC",
      -  "STD_DEV_DESC",
      -  "COEFFICIENT_OF_VARIATION_ASC",
      -  "COEFFICIENT_OF_VARIATION_DESC",
      -  "SAMPLE_COUNT_ASC",
      -  "SAMPLE_COUNT_DESC"
      -]New value: +[
      +  "HOSPITAL_PAYER_RATE_ORDER_UNSPECIFIED",
      +  "AVG_ASC",
      +  "AVG_DESC",
      +  "MIN_ASC",
      +  "MAX_DESC",
      +  "HOSPITAL_NAME",
      +  "MEDIAN_ASC",
      +  "MEDIAN_DESC",
      +  "MIN_DESC",
      +  "MAX_ASC",
      +  "STD_DEV_ASC",
      +  "STD_DEV_DESC",
      +  "COEFFICIENT_OF_VARIATION_ASC",
      +  "COEFFICIENT_OF_VARIATION_DESC",
      +  "SAMPLE_COUNT_ASC",
      +  "SAMPLE_COUNT_DESC",
      +  "MEDIAN_PCT_ASC",
      +  "MEDIAN_PCT_DESC",
      +  "AVG_PCT_ASC",
      +  "AVG_PCT_DESC"
      +]
  2. Changed4 schema fields changed
    • addedInput schema / properties / min_sample_count
      Added value: +{
      +  "description": "Only hospitals whose figure has at least this many billing records (sample count lower bound). 0 keeps every hospital; negative is rejected.",
      +  "type": "integer"
      +}
    • changedInput schema / properties / order_by / description
      Previous value: -"Defaults to AVG_ASC (cheapest average first)."New value: +"Defaults to AVG_ASC (cheapest average first). STD_DEV_* orders by how widely the payer's rates vary at a hospital, COEFFICIENT_OF_VARIATION_* by that spread relative to the price level (comparable across hospitals); pair those with min_sample_count since thin filings have an artificially low spread."
    • changedInput schema / properties / order_by / enum
      Previous value: -[
      -  "HOSPITAL_PAYER_RATE_ORDER_UNSPECIFIED",
      -  "AVG_ASC",
      -  "AVG_DESC",
      -  "MIN_ASC",
      -  "MAX_DESC",
      -  "HOSPITAL_NAME"
      -]New value: +[
      +  "HOSPITAL_PAYER_RATE_ORDER_UNSPECIFIED",
      +  "AVG_ASC",
      +  "AVG_DESC",
      +  "MIN_ASC",
      +  "MAX_DESC",
      +  "HOSPITAL_NAME",
      +  "MEDIAN_ASC",
      +  "MEDIAN_DESC",
      +  "MIN_DESC",
      +  "MAX_ASC",
      +  "STD_DEV_ASC",
      +  "STD_DEV_DESC",
      +  "COEFFICIENT_OF_VARIATION_ASC",
      +  "COEFFICIENT_OF_VARIATION_DESC",
      +  "SAMPLE_COUNT_ASC",
      +  "SAMPLE_COUNT_DESC"
      +]
    • addedInput schema / properties / state
      Added value: +{
      +  "description": "Optional two-letter USPS state code (e.g. \"TX\", case-insensitive): only hospitals with a location in that state are counted. A hospital in several states counts in each, so state figures can add up to more than national ones. Empty means every hospital; anything that is not a state code is rejected as INVALID_ARGUMENT.",
      +  "type": "string"
      +}
  3. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description adds genuinely new behavior: the page_size default and 500 cap, the presence of total_count, the dependency on the hospital-prices serving snapshot, and the UNAVAILABLE failure mode before a snapshot is opened. It stops short of describing response row fields, but with no output schema that is the main remaining gap.

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

Conciseness4/5

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

Three sentences, front-loaded with the row shape and granularity, followed by use case and then operational constraints. The telegraphic compression ('Defaults/caps page_size at 500') is efficient but slightly terse; nothing is padded.

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

Completeness4/5

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

For a 9-parameter, nested-filter tool with no output schema, the description covers row granularity, pagination behavior, snapshot dependency, and the failure mode an agent must handle. What is missing is a pointer to the sibling for single-hospital lookups and any hint about which fields each row carries.

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

Parameters4/5

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

Schema coverage is already 78%, so most parameters are self-documented, and the description still adds real meaning by stating the page_size default/cap and that responses carry total_count. It also clarifies the rollup semantics that govern how filter and grouping parameters interact, rather than restating the schema.

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

Purpose4/5

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

The description states a precise resource and granularity: 'one payer's rate for a (code_type, code) at each hospital, one row per hospital and billing class/methodology/setting,' which tells an agent exactly what a returned row represents. It also scopes the rollup ('rolled up across the payer's plans there'), distinguishing it from a per-plan or per-hospital lookup, though it never names the sibling that would be used instead.

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

Usage Guidelines3/5

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

'Good for "which hospital is cheapest for Aetna members"' gives one concrete usage scenario and implies the comparison use case. However, there is no explicit when-not guidance and no named alternative (e.g., the single-hospital sibling) for the case where an agent already has one hospital in hand, leaving the choice to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.