Skip to main content
Glama

Compare one billing code's prices across hospitals

compare_code_prices
Read-onlyIdempotent

Compare negotiated rates for a medical billing code across hospitals. Returns min, quartiles, and max per payer plan with source file citations, and lists hospitals that don't publish the code.

Instructions

Negotiated-rate summary (min, quartiles, max over payer plans) for one billing code at each hospital in the release, for one rate basis, with the hospital's source file cited on every row. Hospitals that publish the code differently are listed in not_included with what they do publish.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesBilling code as published, e.g. CPT 99213, HCPCS J1885, MS-DRG 470. Use find_codes to get one.
settingNoRestrict to one care setting. Omit to get every setting, one row per hospital and setting.
rate_basisNoHow the negotiated rate was published. 'dollar' = contracted dollar amount; 'dollar_from_percent' = a percentage of the hospital's own charge, converted to dollars; 'dollar_percent_unreconciled' = a dollar and a percentage that disagree (the dollar is used); 'algorithm_only', 'percent_only' and 'no_payer' carry no dollar rate. Compare hospitals on 'dollar' unless asked otherwise.dollar
code_familyNoOnly needed if the code string exists in more than one code family (the tool says so).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
notesYes
pricesYesOne row per hospital × setting. Never averaged or summed across rows.
settingYesThe setting filter applied, or null for all settings
rate_basisYes
code_familyYes
release_tagYes
not_includedYesHospitals with no row under this rate basis and setting, and what they publish instead

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), and the description adds meaningful behavior beyond that: every row cites the hospital's source file, and hospitals that publish the code differently are captured in not_included rather than silently dropped. It does not discuss permissions or failure modes, but the edge-case handling disclosure is genuinely useful.

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?

Two dense sentences with no wasted words, though it front-loads the return shape rather than the action, and both sentences are long. Still efficient and information-rich.

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 4-parameter, fully-described-schema tool with an output schema, the description is largely complete: it explains the summary statistics, the rate-basis constraint, and the not_included behavior. Missing only the routing guidance to sibling tools that would make it self-sufficient.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already explains code, setting, rate_basis, and code_family in detail. The description only reinforces 'one rate basis' and the per-hospital scope; it adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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 operation (negotiated-rate summary for one billing code) with explicit scope (each hospital in the release, one rate basis) and names the exact output dimensions (min, quartiles, max over payer plans). This is clearly distinguishable from detail-oriented siblings like get_payer_rates.

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?

Usage is only implied: the cross-hospital summary framing suggests this is for comparing a code's rates rather than drilling into individual payer rates, and the schema (not the description) points to find_codes as a prerequisite. No explicit when-to-use/when-not statement or named alternative appears in the description.

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