Skip to main content
Glama

Batch get hospital chargemaster costs

batch_get_hospital_chargemaster_cost
Read-only

Looks up cost stats for several (code_type, code) pairs at one hospital (identified by hospital_id) in a single call - the batch counterpart to get_hospital_chargemaster_cost. Use this instead of calling get_hospital_chargemaster_cost once per code when pricing a fixed set of codes at one hospital (e.g. cross-linking a curated list of procedures on a hospital's page). Capped at 100 codes per call; a request over that is rejected with INVALID_ARGUMENT rather than silently truncated. Served from the hospital-prices serving snapshot, which pools exactly (exact medians), so figures can differ slightly from earlier results of this tool. Like those, each figure still combines facility and professional charges (and all settings) into one number; use batch_get_hospital_provider_code_costs for a per-billing-class breakdown instead.

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": {
      "hospital_id": "<hospital_id>",
      "codes": "<codes>"
    },
    "name": "batch_get_hospital_chargemaster_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
codesYesThe (code_type, code) pairs to price at this hospital - up to 100 entries. Results come back in this same order.
hospital_idYesOpaque hospital identifier from list_hospitals.
revision_idNoOptional. A revision_id from list_hospitals' per-hospital revisions array, to price that specific past revision instead of the hospital's latest one, applied to every code in this batch. Omit to use the latest revision.

Output Schema

NameRequiredDescriptionDefault
resultsNoOne entry per requested code, in request order - found=false (not omitted) when this hospital has no data for that code.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedOutput schema / properties / results / items / properties / results / items / properties / cost / properties / sample_count_sum_max / description
      Previous value: -"Upper bound on the summed CMS sample-remittance count across contributing payer rows. Equal to sample_count_sum_min unless a de-identified '1 through 10' row narrowed it to a range."New value: +"Upper bound on the summed CMS sample-remittance count across contributing payer rows, as a decimal string (int64 - see protoLoaderOptions.longs). Equal to sample_count_sum_min unless a de-identified '1 through 10' row narrowed it to a range."
    • changedOutput schema / properties / results / items / properties / results / items / properties / cost / properties / sample_count_sum_max / type
      Previous value: -"integer"New value: +"string"
    • changedOutput schema / properties / results / items / properties / results / items / properties / cost / properties / sample_count_sum_min / description
      Previous value: -"Lower bound on the summed CMS sample-remittance count across contributing payer rows. Equal to sample_count_sum_max unless a de-identified '1 through 10' row narrowed it to a range."New value: +"Lower bound on the summed CMS sample-remittance count across contributing payer rows, as a decimal string (int64 - see protoLoaderOptions.longs). Equal to sample_count_sum_max unless a de-identified '1 through 10' row narrowed it to a range."
    • changedOutput schema / properties / results / items / properties / results / items / properties / cost / properties / sample_count_sum_min / type
      Previous value: -"integer"New value: +"string"
    • changedOutput schema / properties / results / items / properties / results / items / properties / cost / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / results / items / properties / results / items / properties / description / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Well beyond the readOnly/non-destructive annotations, it discloses the 100-code cap and, importantly, that over-cap requests are rejected with INVALID_ARGUMENT rather than silently truncated. It also warns that results come from a serving snapshot and may differ from earlier runs of the same tool — meaningful operational context. It stops short of describing pagination or latency/rate behavior, so a 4 rather than 5.

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?

Purpose and the batch-vs-singular distinction are front-loaded, and every sentence carries information. However the run-on sentence with nested parentheses and em-dashes is dense, and the ordering/cap facts are stated twice (description and schema), costing some readability.

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?

An output schema exists, so return values need not be explained, and the description covers everything else an agent needs: batching rationale, the hard cap with its failure mode, snapshot/consistency caveats, and aggregation behavior. Nothing required to call it correctly is missing.

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 100%, so the baseline is 3, but the description adds result-shaping meaning the schema does not: each returned figure still combines facility and professional charges and all settings into one number, and the alternative tool exists for a per-class breakdown. It also restates the 100-entry bound and request-order return, which reinforces rather than duplicates parameter intent.

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?

Opens with a specific verb and resource ('Looks up cost stats for several (code_type, code) pairs at one hospital') and immediately positions itself as 'the batch counterpart to get_hospital_chargemaster_cost'. It also names the sibling it is not (batch_get_hospital_provider_code_costs) for a different breakdown, so an agent can distinguish it without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use rule: use this instead of calling get_hospital_chargemaster_cost once per code when pricing a fixed set of codes at one hospital, with a concrete example (cross-linking a curated procedure list). It also names the alternative for a per-billing-class breakdown, so both the positive and negative selection conditions are covered.

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.