Skip to main content
Glama

List supported hospitals

list_hospitals
Read-only

Returns the hospitals supported by the medprice.ai API, with their hospital_id (opaque handle), EIN, name, structured_locations (addresses with geocoded coordinates where available), last_updated_on, and revision history (with per-revision has_payer_data, revision_id, and added_at - when medprice itself ingested that revision, as opposed to revision_date's source-file-reported update date). Defaults to returning the entire registry (currently a few hundred hospitals) in one call. If the response's next_page_token is non-empty, the result set was truncated: call this tool again passing that exact value as page_token to get the next page, and keep doing so until next_page_token is empty - do not stop after one page and conclude the list is complete. The response's total_count field (total across all pages) can be compared against how many hospitals you've accumulated so far as a completeness check, e.g. before answering questions like 'does medprice.ai cover any hospitals in Iowa'.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_hospitals"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoOptional case-insensitive hospital-name search: matches substrings of hospital_name, ranked exact name, name prefix, word-start, then other substrings (ties by name). Blank is treated as unset, which keeps the default hospital_id ordering. total_count counts matches only.
stateNoOptional two-letter USPS state code (e.g. "TX", case-insensitive): only hospitals with a location in that state (those whose states contain it). total_count counts matches only. Anything that is not a state code is rejected as INVALID_ARGUMENT. page_token is only valid with the same state it was issued for.
page_sizeNoMaximum number of hospitals to return. Defaults to 500 (covering the entire current registry in one call), capped at 500.
page_tokenNoOpaque token from a previous list_hospitals response's next_page_token field. Omit for the first page. Do not pass any other value (e.g. an offset or cursor you construct yourself) here. Only valid with the same query it was issued for.

Output Schema

NameRequiredDescriptionDefault
hospitalsNo
total_countNoTotal number of hospitals matching this query, across all pages, not just this page's hospitals.length. Compare against hospitals.length (plus any prior pages) before concluding the full hospital list has been seen - e.g. before answering 'does medprice.ai support any hospitals in state X' or similar completeness questions.
next_page_tokenNoOpaque pagination token, empty when there are no more results.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields 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 (those whose states contain it). total_count counts matches only. Anything that is not a state code is rejected as INVALID_ARGUMENT. page_token is only valid with the same state it was issued for.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / hospitals / items / properties / states
      Added value: +{
      +  "description": "The hospital's distinct states (USPS codes), sorted; empty only when no location has a state.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / hospitals / items / properties / structured_locations / items / properties / state
      Added value: +{
      +  "description": "Two-letter USPS state code of the address; absent when unknown.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / page_token / description
      Previous value: -"Opaque token from a previous list_hospitals response's next_page_token field. Omit for the first page. Do not pass any other value (e.g. an offset or cursor you construct yourself) here."New value: +"Opaque token from a previous list_hospitals response's next_page_token field. Omit for the first page. Do not pass any other value (e.g. an offset or cursor you construct yourself) here. Only valid with the same query it was issued for."
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Optional case-insensitive hospital-name search: matches substrings of hospital_name, ranked exact name, name prefix, word-start, then other substrings (ties by name). Blank is treated as unset, which keeps the default hospital_id ordering. total_count counts matches only.",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / hospitals / items / properties / revisions / items / properties / added_at
      Added value: +{
      +  "description": "ISO-8601 UTC timestamp of when medprice itself ingested this revision (server-set at insert time) - not derived from revision_date/last_updated_on, which reflects the source file's own self-reported update date and can lag well behind actual ingestion. Useful for sorting/highlighting by 'recently added to medprice' rather than 'recently updated by the hospital'.",
      +  "type": "string"
      +}
  4. Changed3 schema fields changed
    • changedInput schema / properties / page_size / description
      Previous value: -"Maximum number of hospitals to return. Defaults to 20, capped at 100."New value: +"Maximum number of hospitals to return. Defaults to 500 (covering the entire current registry in one call), capped at 500."
    • changedInput schema / properties / page_token / description
      Previous value: -"Opaque token from a previous list_hospitals response. Omit for the first page."New value: +"Opaque token from a previous list_hospitals response's next_page_token field. Omit for the first page. Do not pass any other value (e.g. an offset or cursor you construct yourself) here."
    • addedOutput schema / properties / total_count
      Added value: +{
      +  "description": "Total number of hospitals matching this query, across all pages, not just this page's hospitals.length. Compare against hospitals.length (plus any prior pages) before concluding the full hospital list has been seen - e.g. before answering 'does medprice.ai support any hospitals in state X' or similar completeness questions.",
      +  "type": "integer"
      +}
  5. Changed1 schema field changed
    • addedOutput schema / properties / hospitals / items / properties / revisions / items / properties / revision_id
      Added value: +{
      +  "description": "Opaque handle for this specific revision - pass back as revision_id to get_hospital_chargemaster_cost to price this revision instead of the hospital's latest one.",
      +  "type": "string"
      +}
  6. Changed2 schema fields changed
    • addedOutput schema / properties / hospitals / items / properties / locations / description
      Added value: +"Deprecated - use structured_locations instead."
    • addedOutput schema / properties / hospitals / items / properties / structured_locations
      Added value: +{
      +  "description": "Same addresses as locations, plus geocoded coordinates where available.",
      +  "items": {
      +    "properties": {
      +      "address": {
      +        "type": "string"
      +      },
      +      "lat": {
      +        "type": "number"
      +      },
      +      "lng": {
      +        "type": "number"
      +      },
      +      "precision": {
      +        "description": "Geocoding precision: STREET is a full street-address match, CITY is a city/state fallback, UNKNOWN means not yet geocoded or precision wasn't recorded.",
      +        "enum": [
      +          "LOCATION_PRECISION_UNKNOWN",
      +          "LOCATION_PRECISION_STREET",
      +          "LOCATION_PRECISION_CITY"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  7. Changed2 schema fields changed
    • changedOutput schema / properties / hospitals / items / properties / last_updated_on / description
      Previous value: -"ISO-8601 date the source file was last updated."New value: +"ISO-8601 date the source file was last updated. Duplicates the last (most recent) entry in revisions."
    • addedOutput schema / properties / hospitals / items / properties / revisions
      Added value: +{
      +  "description": "Every known revision of this hospital's filing, oldest first. Usually a single entry.",
      +  "items": {
      +    "properties": {
      +      "has_payer_data": {
      +        "description": "Whether this revision included payer-specific negotiated-rate data, as opposed to gross/cash price only.",
      +        "type": "boolean"
      +      },
      +      "revision_date": {
      +        "description": "ISO-8601 date this revision's source file was last updated on.",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  8. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "hospitals": {
      +      "items": {
      +        "properties": {
      +          "ein": {
      +            "description": "Employer Identification Number for the hospital legal entity.",
      +            "type": "string"
      +          },
      +          "hospital_id": {
      +            "description": "Opaque hospital identifier to use with get_hospital_chargemaster_cost.",
      +            "type": "string"
      +          },
      +          "hospital_name": {
      +            "type": "string"
      +          },
      +          "last_updated_on": {
      +            "description": "ISO-8601 date the source file was last updated.",
      +            "type": "string"
      +          },
      +          "locations": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "next_page_token": {
      +      "description": "Opaque pagination token, empty when there are no more results.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  9. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description goes beyond that by disclosing default scope (entire registry, a few hundred records), truncation behavior, and the total_count completeness check. However, with an output schema present and annotations covering the safety profile, much of the rest restates structured data, so this sits at a solid 3.

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?

Information is front-loaded (what is returned, then default behavior, then pagination loop, then completeness check) and every sentence carries operational weight. It is dense and somewhat long with parenthetical asides, but none of it is filler.

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 paginated read-only registry tool, the description covers scope, defaults, page limits, token handling, and a completeness check, leaving nothing an agent needs in order to call it correctly. Supporting detail like the output schema further reduces the burden.

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 meaning the schema does not: it ties page_token to next_page_token from a prior response and explains how total_count lets the agent verify accumulated results across pages. That operational context about pagination is genuinely additive rather than duplicated.

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?

Opens with a specific verb and resource ('Returns the hospitals supported by the medprice.ai API') and enumerates the returned fields (hospital_id, EIN, name, structured_locations, last_updated_on, revisions), so the agent knows exactly what the tool yields. It does not explicitly name or route against sibling list_* tools, which keeps it just short of a 5.

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 concrete operating instructions: default is the entire registry in one call, and if next_page_token is non-empty the agent must loop with that exact token until it is empty. It even supplies a use case ('before answering questions like does medprice.ai cover any hospitals in Iowa'). It stops short of stating when to prefer a sibling such as list_payer_hospitals.

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.