Skip to main content
Glama

Summarize the price terms hospitals file a code under

get_code_provider_terms_summary
Read-only

Which billing classes, methodologies and settings hospitals file a (code_type, code) under, and how many hospitals each group has, so a caller can offer the choices before calling list_code_provider_hospitals or get_code_provider_price_distribution. group_by sets what each entry is a group of (default: one set of terms). A hospital filing several groups is counted in each, so don't sum the entries' hospital_count; use the top-level hospital_count for distinct hospitals. 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>"
    },
    "name": "get_code_provider_terms_summary"
  }
}

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.
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), GROUP_BY_ALL_EXCEPT_PER_DIEM (like ALL but without per diem rows, since a per diem is a price for a day), GROUP_BY_BILLING_CLASS_METHODOLOGY (one row per billing class and methodology, pooled over settings; name both in the filter for one figure per hospital), 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.
min_sample_countNoOnly count hospitals whose figure has at least this many billing records (same rule as list_code_provider_hospitals). Negative values are rejected.

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), 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)."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), GROUP_BY_ALL_EXCEPT_PER_DIEM (like ALL but without per diem rows, since a per diem is a price for a day), GROUP_BY_BILLING_CLASS_METHODOLOGY (one row per billing class and methodology, pooled over settings; name both in the filter for one figure per hospital), 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",
      -  "GROUP_BY_FACILITY_PLUS_PROFESSIONAL"
      -]New value: +[
      +  "GROUP_BY_PER_COMBINATION",
      +  "GROUP_BY_BILLING_CLASS",
      +  "GROUP_BY_METHODOLOGY",
      +  "GROUP_BY_ALL",
      +  "GROUP_BY_FACILITY_PLUS_PROFESSIONAL",
      +  "GROUP_BY_BILLING_CLASS_METHODOLOGY",
      +  "GROUP_BY_ALL_EXCEPT_PER_DIEM"
      +]
  2. Changed1 schema field changed
    • 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. 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"
      +]
  4. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true, openWorldHint=false and destructiveHint=false, and the description adds genuinely useful behavior beyond them: hospitals appearing in multiple groups are counted multiple times, the top-level hospital_count gives distinct hospitals, and the tool fails with UNAVAILABLE until a serving snapshot is opened. However, it gives no detail on output shape, ordering, or pagination. With the safety profile already covered by annotations, this is solid supplemental context rather than rich behavioral disclosure.

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?

The scoping statement and the sibling hand-off are front-loaded in one sentence, with the counting caveat and the snapshot failure mode following. It is dense but every clause carries information; the only weakness is that the second and third sentences are long and could be split for scanability.

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?

For a five-parameter aggregation tool with no output schema and no output_schema coverage, the description still conveys the shape of the result (entries of grouped terms plus counts, with a distinct top-level count) and the snapshot-dependency failure mode. An agent could call this correctly and interpret the response without further documentation.

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 80%, so the schema already carries most parameter meaning. The description adds interpretive context by explaining that group_by determines what each entry is a group of and defaults to a single set of terms, and it clarifies the consequence of overlapping hospital counts that governs how hospital_count should be read.

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 states a concrete verb (summarize) plus the resource in precise terms: 'which billing classes, methodologies and settings hospitals file a (code_type, code) under, and how many hospitals each group has'. It also distinguishes itself from the two sibling tools a caller would otherwise reach for, list_code_provider_hospitals and get_code_provider_price_distribution.

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?

It names the exact workflow position — 'so a caller can offer the choices before calling' the two sibling tools — which is an explicit when-to-use with named alternatives. It also explains that group_by selects what each entry is a group of, and warns that overlapping-hospital counting makes entry sums invalid, both of which affect how the tool should be used.

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.