Skip to main content
Glama

Get a hospital's provider charges for a code

get_hospital_provider_code_costs
Read-only

Returns one hospital's own charges for a (code_type, code), one entry per row of the group_by grouping (default: per billing class, methodology and setting; never blended unless GROUP_BY_ALL), plus an all_terms figure over all of them regardless of grouping. Unlike get_hospital_chargemaster_cost, billing classes are not mixed into one figure. Pass revision_id to answer for a past filing. 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": {
      "hospital_id": "<hospital_id>",
      "code_type": "<code_type>",
      "code": "<code>"
    },
    "name": "get_hospital_provider_code_costs"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
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.
group_byNoWhich rows exist: one per billing class + methodology + setting (GROUP_BY_PER_COMBINATION, the default), per billing class, per methodology, or GROUP_BY_ALL (one figure over everything, blending billing classes), or GROUP_BY_FACILITY_PLUS_PROFESSIONAL (one row per methodology and setting the hospital files under both the facility and the professional billing class, the two added together, i.e. the combined bill; terms are methodology and setting, no billing class; no row where there is no professional counterpart). Applied before filter, which may name only the terms the grouping still keeps (e.g. GROUP_BY_BILLING_CLASS with a methodology filter, or GROUP_BY_ALL with any filter, is rejected as INVALID_ARGUMENT).
code_typeYesCode system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC.
hospital_idYesOpaque hospital identifier from list_hospitals.
revision_idNoOptional. A revision_id from list_hospitals' per-hospital revisions array. Omit for the latest revision.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / group_by / description
      Previous value: -"Which rows exist: one per billing class + methodology + setting (GROUP_BY_PER_COMBINATION, the default), per billing class, per methodology, or GROUP_BY_ALL (one figure over everything, blending billing classes). Applied before filter, which may name only the terms the grouping still keeps (e.g. GROUP_BY_BILLING_CLASS with a methodology filter, or GROUP_BY_ALL with any filter, is rejected as INVALID_ARGUMENT)."New value: +"Which rows exist: one per billing class + methodology + setting (GROUP_BY_PER_COMBINATION, the default), per billing class, per methodology, or GROUP_BY_ALL (one figure over everything, blending billing classes), or GROUP_BY_FACILITY_PLUS_PROFESSIONAL (one row per methodology and setting the hospital files under both the facility and the professional billing class, the two added together, i.e. the combined bill; terms are methodology and setting, no billing class; no row where there is no professional counterpart). Applied before filter, which may name only the terms the grouping still keeps (e.g. GROUP_BY_BILLING_CLASS with a methodology filter, or GROUP_BY_ALL with any filter, is rejected as INVALID_ARGUMENT)."
    • changedInput schema / properties / group_by / enum
      Previous value: -[
      -  "GROUP_BY_PER_COMBINATION",
      -  "GROUP_BY_BILLING_CLASS",
      -  "GROUP_BY_METHODOLOGY",
      -  "GROUP_BY_ALL"
      -]New value: +[
      +  "GROUP_BY_PER_COMBINATION",
      +  "GROUP_BY_BILLING_CLASS",
      +  "GROUP_BY_METHODOLOGY",
      +  "GROUP_BY_ALL",
      +  "GROUP_BY_FACILITY_PLUS_PROFESSIONAL"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / properties / filter / description
      Previous value: -"Restricts which price terms are returned. 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."New value: +"Keeps 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."
    • addedInput schema / properties / group_by
      Added value: +{
      +  "description": "Which rows exist: one per billing class + methodology + setting (GROUP_BY_PER_COMBINATION, the default), per billing class, per methodology, or GROUP_BY_ALL (one figure over everything, blending billing classes). Applied before filter, which may name only the terms the grouping still keeps (e.g. GROUP_BY_BILLING_CLASS with a methodology filter, or GROUP_BY_ALL with any filter, is rejected as INVALID_ARGUMENT).",
      +  "enum": [
      +    "GROUP_BY_PER_COMBINATION",
      +    "GROUP_BY_BILLING_CLASS",
      +    "GROUP_BY_METHODOLOGY",
      +    "GROUP_BY_ALL"
      +  ],
      +  "type": "string"
      +}
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the read-only, non-destructive profile, and the description still adds real behavior: it discloses the never-blended rule unless GROUP_BY_ALL, the rejection of filter terms the grouping no longer keeps (INVALID_ARGUMENT), and the UNAVAILABLE precondition tied to the serving snapshot. These are failure modes and constraints the annotations cannot convey.

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?

Front-loaded with the result-defining sentence, then the sibling contrast, then the revision and snapshot notes — a sensible order with no filler. The long parenthetical enumerating defaults and the GROUP_BY_ALL caveat makes individual sentences dense and slightly harder to scan.

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?

With no output schema, the description must sketch the return shape, and it does (one entry per grouping row plus an all_terms aggregate) while also covering the main error paths. What the charge figures actually contain (e.g. gross charge, cash/discounted price fields) is left unstated, which is the main remaining gap for a 6-parameter query tool.

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 83%, so the schema carries most parameter documentation; the description still adds cross-parameter semantics the schema states less prominently: the default grouping (per billing class + methodology + setting), the ordering of group_by before filter, and the effect of revision_id on which filing is answered. Marginal but genuine value over the structured fields.

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?

States a specific verb and resource — one hospital's own charges for a (code_type, code) — and pins down the result shape (one entry per group_by row plus an all_terms figure). It explicitly contrasts with the sibling get_hospital_chargemaster_cost on the blending dimension, so an agent can choose between them without opening schemas.

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?

Gives clear routing context: use it when you need this hospital's unblended figures, omit revision_id for latest, pass revision_id for a past filing, and expect UNAVAILABLE until a snapshot is opened. It does not name alternatives for the adjacent cases (list_hospital_provider_codes, get_code_provider_price_distribution), so the exclusion set is incomplete, but the stated guidance is actionable.

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.