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'.

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.
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. 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"
      +}
  2. 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"
      +}
  3. 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"
      +}
  4. 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"
      +}
  5. 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"
      +}
  6. 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"
      +}
  7. 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"
      +}
  8. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: truncation semantics, total_count scope, and the distinction between revision added_at (medprice ingestion) and revision_date (source-reported). That is useful added context, but the lower bar from annotations keeps this at a solid 3 rather than higher.

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 resource and returned fields, then pagination rules, then the completeness check. Every sentence carries information, though the field enumeration in sentence one is dense and the revision-date digression is long-winded.

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?

Covers the full call lifecycle: default single-call full registry, page-size cap, token round-trip, and how to verify completeness via total_count. With an output schema present the description needn't explain return values, yet the field-level detail is a harmless bonus that leaves nothing an agent needs unanswered.

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 coverage is 100%, so the schema already documents query, page_size and page_token in detail, establishing the baseline of 3. The description reinforces the page_token contract (pass next_page_token verbatim, same query) and page_size default, but adds no syntax or format detail the schema lacks.

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 ('Returns the hospitals supported by the medprice.ai API') and enumerates the returned fields. It is unmistakably distinct from the sibling cost/code tools, which all operate on chargemaster or pricing data rather than the hospital registry.

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 explicit operational guidance: default is the full registry in one call, and pagination must be continued until next_page_token is empty, with a total_count completeness check and a concrete example ('does medprice.ai cover any hospitals in Iowa'). It stops short of naming which sibling to use to fetch costs for a given hospital_id, so no explicit alternatives routing.

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.