{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "mcp.medprice.ai",
    "site": "medprice.ai",
    "addresses": [
      {
        "address": "172.67.202.141",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      },
      {
        "address": "104.21.60.241",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      },
      {
        "address": "2606:4700:3031::6815:3cf1",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      },
      {
        "address": "2606:4700:3030::ac43:ca8d",
        "endpoints": 1,
        "shared_infrastructure": false,
        "network": null
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "172.67.202.141",
          "104.21.60.241",
          "2606:4700:3031::6815:3cf1",
          "2606:4700:3030::ac43:ca8d"
        ],
        "first_seen": "2026-11-23T20:29:01.487Z",
        "last_seen": "2026-11-23T20:29:01.487Z",
        "checks": 1
      },
      {
        "addresses": [
          "104.21.60.241",
          "172.67.202.141",
          "2606:4700:3030::ac43:ca8d",
          "2606:4700:3031::6815:3cf1"
        ],
        "first_seen": "2026-11-22T20:28:02.245Z",
        "last_seen": "2026-11-22T20:28:02.245Z",
        "checks": 1
      },
      {
        "addresses": [
          "172.67.202.141",
          "104.21.60.241",
          "2606:4700:3030::ac43:ca8d",
          "2606:4700:3031::6815:3cf1"
        ],
        "first_seen": "2026-11-21T16:20:02.732Z",
        "last_seen": "2026-11-21T16:20:02.732Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Cloudflare",
        "evidence": "Server header \"cloudflare\""
      }
    ],
    "software": [],
    "server_info": {
      "name": "mcp-medprice-ai",
      "version": "0.0.1",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "cloudflare"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 0,
      "sample": []
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "io.github.medprice-ai",
      "total": 0,
      "sample": []
    },
    "same_repository": {
      "repository_url": "https://github.com/medprice-ai/mcp-medprice-ai",
      "total": 0,
      "sample": []
    },
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "32961",
    "server_name": "io.github.medprice-ai/mcp-medprice-ai",
    "url": "https://mcp.medprice.ai/mcp",
    "host": "mcp.medprice.ai",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-23T20:29:01.487Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "1e1dea65bba76b8707b4b1f9e23fdb24ab0860cfc8dc1ebb3df50063954b0a70",
    "first_listed_at": "2026-11-21T16:20:02.732Z",
    "created_at": "2026-11-21T10:30:12.027Z",
    "resolved_addresses": [
      "172.67.202.141",
      "104.21.60.241",
      "2606:4700:3031::6815:3cf1",
      "2606:4700:3030::ac43:ca8d"
    ]
  },
  "server": {
    "name": "io.github.medprice-ai/mcp-medprice-ai",
    "title": "MedPrice AI",
    "description": "Hosted MCP server exposing US hospital procedure cost data to AI assistants",
    "version": "0.0.1",
    "registry_status": "active",
    "repository_url": "https://github.com/medprice-ai/mcp-medprice-ai",
    "website_url": null,
    "published_at": "2026-06-19T19:40:32.192Z",
    "updated_at": "2026-06-19T19:40:32.192Z",
    "first_seen": "2026-11-21T10:30:11.584Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T15:35:14.425Z"
  },
  "operator": {
    "key": "medprice.ai",
    "name": "medprice.ai",
    "platform": false,
    "marketplace": false
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 3,
    "answered": 3,
    "answered_percent": 100,
    "avg_listing_latency_ms": 914,
    "first_check_in_window": "2026-11-21T16:20:02.732Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-23",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "1e1dea65bba76b8707b4b1f9e23fdb24ab0860cfc8dc1ebb3df50063954b0a70",
    "tools": 24,
    "resources": 0,
    "prompts": 0,
    "first_seen": "2026-11-21T16:20:03.096Z",
    "tool_names": [
      "get_hospital_chargemaster_cost",
      "batch_get_hospital_chargemaster_cost",
      "list_hospitals",
      "list_hospital_code_costs",
      "get_code_price_distribution",
      "get_hospital_provider_code_costs",
      "batch_get_hospital_provider_code_costs",
      "list_hospital_provider_codes",
      "list_code_provider_hospitals",
      "get_code_provider_price_distribution",
      "get_code_provider_terms_summary",
      "list_code_payers",
      "get_hospital_code_payer_rates",
      "list_code_payer_hospitals",
      "get_code_payer_price_distribution",
      "get_code_payers_price_distribution",
      "list_payers",
      "get_payer",
      "list_payer_plans",
      "list_hospital_plans",
      "list_hospital_payers",
      "list_payer_hospitals",
      "list_code_types",
      "list_codes"
    ],
    "declared": {
      "tools": [
        {
          "name": "get_hospital_chargemaster_cost",
          "title": "Get hospital chargemaster cost",
          "description": "Looks up one hospital's cost stats (min/max/avg/median/std_dev and sample counts) for a code_type/code: a single all-terms figure, or one entry per requested methodology. Served from the hospital-prices serving snapshot, which pools exactly (exact medians), so figures can differ slightly from earlier results of this tool. Like those, each figure still combines facility and professional charges (and all settings) into one number; use get_hospital_provider_code_costs for a per-billing-class breakdown instead. Fails with UNAVAILABLE until the server has opened a snapshot. Fields without a counterpart in the snapshot data are left empty (description.methodology_note).",
          "inputSchema": {
            "type": "object",
            "required": [
              "hospital_id",
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "code_type": {
                "type": "string",
                "description": "Code system the chargemaster/billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC. Hospitals may also support additional proprietary code types not listed here."
              },
              "hospital_id": {
                "type": "string",
                "description": "Opaque hospital identifier from list_hospitals."
              },
              "revision_id": {
                "type": "string",
                "description": "Optional. A revision_id from list_hospitals' per-hospital revisions array, to price that specific past revision instead of the hospital's latest one. Omit to use the latest revision."
              },
              "methodologies": {
                "type": "array",
                "items": {
                  "enum": [
                    "case rate",
                    "fee schedule",
                    "other",
                    "percent of total billed charges",
                    "per diem"
                  ],
                  "type": "string"
                },
                "description": "Pricing methodologies to price, one result per entry in request order. Omit or pass an empty array to get a single aggregate result across all methodologies."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "found": {
                "type": "boolean",
                "description": "True if at least one entry in results was found."
              },
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "cost": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "avg": {
                          "type": "string"
                        },
                        "max": {
                          "type": "string"
                        },
                        "min": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "median": {
                          "type": "string"
                        },
                        "std_dev": {
                          "type": "string"
                        },
                        "code_type": {
                          "type": "string"
                        },
                        "sample_count_exact": {
                          "type": "boolean",
                          "description": "True iff sample_count_sum_min == sample_count_sum_max, i.e. no contributing row was a de-identified '1 through 10' range."
                        },
                        "sample_count_sum_max": {
                          "type": "string",
                          "description": "Upper bound on the summed CMS sample-remittance count across contributing payer rows, as a decimal string (int64 - see protoLoaderOptions.longs). Equal to sample_count_sum_min unless a de-identified '1 through 10' row narrowed it to a range."
                        },
                        "sample_count_sum_min": {
                          "type": "string",
                          "description": "Lower bound on the summed CMS sample-remittance count across contributing payer rows, as a decimal string (int64 - see protoLoaderOptions.longs). Equal to sample_count_sum_max unless a de-identified '1 through 10' row narrowed it to a range."
                        }
                      }
                    },
                    "found": {
                      "type": "boolean",
                      "description": "Whether a matching chargemaster cost record was found for this methodology."
                    },
                    "description": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "location": {
                          "type": "string"
                        },
                        "hospital_name": {
                          "type": "string"
                        },
                        "code_description": {
                          "type": "string"
                        },
                        "methodology_note": {
                          "type": "string"
                        }
                      }
                    },
                    "methodology": {
                      "type": "string",
                      "description": "Methodology this entry is scoped to. Empty when aggregated across all methodologies (the request's methodology filter was left empty)."
                    }
                  }
                },
                "description": "One entry per requested methodology, in request order - or, when the methodologies filter was left empty, exactly one aggregate entry."
              },
              "hospital": {
                "type": "string",
                "description": "Hospital name returned by the MedPrice AI backend."
              },
              "hospital_id": {
                "type": "string",
                "description": "Opaque hospital identifier to use with get_hospital_chargemaster_cost or list_hospitals."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "batch_get_hospital_chargemaster_cost",
          "title": "Batch get hospital chargemaster costs",
          "description": "Looks up cost stats for several (code_type, code) pairs at one hospital (identified by hospital_id) in a single call - the batch counterpart to get_hospital_chargemaster_cost. Use this instead of calling get_hospital_chargemaster_cost once per code when pricing a fixed set of codes at one hospital (e.g. cross-linking a curated list of procedures on a hospital's page). Capped at 100 codes per call; a request over that is rejected with INVALID_ARGUMENT rather than silently truncated. Served from the hospital-prices serving snapshot, which pools exactly (exact medians), so figures can differ slightly from earlier results of this tool. Like those, each figure still combines facility and professional charges (and all settings) into one number; use batch_get_hospital_provider_code_costs for a per-billing-class breakdown instead.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hospital_id",
              "codes"
            ],
            "properties": {
              "codes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code_type",
                    "code"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "code_type": {
                      "type": "string",
                      "description": "Code system the chargemaster/billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC. Hospitals may also support additional proprietary code types not listed here."
                    },
                    "methodologies": {
                      "type": "array",
                      "items": {
                        "enum": [
                          "case rate",
                          "fee schedule",
                          "other",
                          "percent of total billed charges",
                          "per diem"
                        ],
                        "type": "string"
                      },
                      "description": "Pricing methodologies to price for this code, one result per entry in request order. Omit or pass an empty array to get a single aggregate result across all methodologies for this code."
                    }
                  }
                },
                "description": "The (code_type, code) pairs to price at this hospital - up to 100 entries. Results come back in this same order."
              },
              "hospital_id": {
                "type": "string",
                "description": "Opaque hospital identifier from list_hospitals."
              },
              "revision_id": {
                "type": "string",
                "description": "Optional. A revision_id from list_hospitals' per-hospital revisions array, to price that specific past revision instead of the hospital's latest one, applied to every code in this batch. Omit to use the latest revision."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "boolean",
                      "description": "True if at least one entry in results was found."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cost": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "avg": {
                                "type": "string"
                              },
                              "max": {
                                "type": "string"
                              },
                              "min": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "median": {
                                "type": "string"
                              },
                              "std_dev": {
                                "type": "string"
                              },
                              "code_type": {
                                "type": "string"
                              },
                              "sample_count_exact": {
                                "type": "boolean",
                                "description": "True iff sample_count_sum_min == sample_count_sum_max, i.e. no contributing row was a de-identified '1 through 10' range."
                              },
                              "sample_count_sum_max": {
                                "type": "string",
                                "description": "Upper bound on the summed CMS sample-remittance count across contributing payer rows, as a decimal string (int64 - see protoLoaderOptions.longs). Equal to sample_count_sum_min unless a de-identified '1 through 10' row narrowed it to a range."
                              },
                              "sample_count_sum_min": {
                                "type": "string",
                                "description": "Lower bound on the summed CMS sample-remittance count across contributing payer rows, as a decimal string (int64 - see protoLoaderOptions.longs). Equal to sample_count_sum_max unless a de-identified '1 through 10' row narrowed it to a range."
                              }
                            }
                          },
                          "found": {
                            "type": "boolean",
                            "description": "Whether a matching chargemaster cost record was found for this methodology."
                          },
                          "description": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "location": {
                                "type": "string"
                              },
                              "hospital_name": {
                                "type": "string"
                              },
                              "code_description": {
                                "type": "string"
                              },
                              "methodology_note": {
                                "type": "string"
                              }
                            }
                          },
                          "methodology": {
                            "type": "string",
                            "description": "Methodology this entry is scoped to. Empty when aggregated across all methodologies (the request's methodology filter was left empty)."
                          }
                        }
                      },
                      "description": "One entry per requested methodology, in request order - or, when the methodology filter was left empty, exactly one aggregate entry."
                    },
                    "hospital": {
                      "type": "string",
                      "description": "Hospital name returned by the MedPrice AI backend."
                    },
                    "hospital_id": {
                      "type": "string",
                      "description": "Opaque hospital identifier to use with get_hospital_chargemaster_cost or list_hospitals."
                    }
                  }
                },
                "description": "One entry per requested code, in request order - found=false (not omitted) when this hospital has no data for that code."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_hospitals",
          "title": "List supported hospitals",
          "description": "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'.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "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."
              },
              "state": {
                "type": "string",
                "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."
              },
              "page_size": {
                "type": "integer",
                "description": "Maximum number of hospitals to return. Defaults to 500 (covering the entire current registry in one call), capped at 500."
              },
              "page_token": {
                "type": "string",
                "description": "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."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "hospitals": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ein": {
                      "type": "string",
                      "description": "Employer Identification Number for the hospital legal entity."
                    },
                    "states": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The hospital's distinct states (USPS codes), sorted; empty only when no location has a state."
                    },
                    "locations": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Deprecated - use structured_locations instead."
                    },
                    "revisions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "added_at": {
                            "type": "string",
                            "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'."
                          },
                          "revision_id": {
                            "type": "string",
                            "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."
                          },
                          "revision_date": {
                            "type": "string",
                            "description": "ISO-8601 date this revision's source file was last updated on."
                          },
                          "has_payer_data": {
                            "type": "boolean",
                            "description": "Whether this revision included payer-specific negotiated-rate data, as opposed to gross/cash price only."
                          }
                        }
                      },
                      "description": "Every known revision of this hospital's filing, oldest first. Usually a single entry."
                    },
                    "hospital_id": {
                      "type": "string",
                      "description": "Opaque hospital identifier to use with get_hospital_chargemaster_cost."
                    },
                    "hospital_name": {
                      "type": "string"
                    },
                    "last_updated_on": {
                      "type": "string",
                      "description": "ISO-8601 date the source file was last updated. Duplicates the last (most recent) entry in revisions."
                    },
                    "structured_locations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "lat": {
                            "type": "number"
                          },
                          "lng": {
                            "type": "number"
                          },
                          "state": {
                            "type": "string",
                            "description": "Two-letter USPS state code of the address; absent when unknown."
                          },
                          "address": {
                            "type": "string"
                          },
                          "precision": {
                            "enum": [
                              "LOCATION_PRECISION_UNKNOWN",
                              "LOCATION_PRECISION_STREET",
                              "LOCATION_PRECISION_CITY"
                            ],
                            "type": "string",
                            "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."
                          }
                        }
                      },
                      "description": "Same addresses as locations, plus geocoded coordinates where available."
                    }
                  }
                }
              },
              "total_count": {
                "type": "integer",
                "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."
              },
              "next_page_token": {
                "type": "string",
                "description": "Opaque pagination token, empty when there are no more results."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_hospital_code_costs",
          "title": "List hospital costs for a billing code",
          "description": "Returns cost stats for every hospital with a matching chargemaster entry for a code_type/code. Use this instead of calling get_hospital_chargemaster_cost once per hospital when comparing prices for the same procedure across hospitals (e.g. \"which hospital has the cheapest MS-DRG 652?\"). Defaults to returning every matching hospital (currently at most a few hundred) 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 a hospital has no data for this code. The response's total_count field (total across all pages) can be compared against how many results you've accumulated so far as a completeness check. Served from the hospital-prices serving snapshot, which pools exactly (exact medians), so figures can differ slightly from earlier results of this tool. Like those, each figure still combines facility and professional charges (and all settings) into one number; use list_code_provider_hospitals for a per-billing-class breakdown instead. page_tokens from before this change are not valid.",
          "inputSchema": {
            "type": "object",
            "required": [
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "query": {
                "type": "string",
                "description": "Optional case-insensitive hospital-name search, applied to the hospitals that report the code and ranked like list_hospitals' query (exact name, name prefix, word-start, other substrings). Blank is treated as unset. total_count and next_page_token describe the matches only."
              },
              "order_by": {
                "enum": [
                  "HOSPITAL_COST_ORDER_UNSPECIFIED",
                  "HOSPITAL_COST_ORDER_HOSPITAL_ID",
                  "HOSPITAL_COST_ORDER_RELEVANCE",
                  "HOSPITAL_COST_ORDER_SAMPLE_COUNT_DESC",
                  "HOSPITAL_COST_ORDER_SAMPLE_COUNT_ASC",
                  "HOSPITAL_COST_ORDER_AVG_ASC",
                  "HOSPITAL_COST_ORDER_AVG_DESC",
                  "HOSPITAL_COST_ORDER_MEDIAN_ASC",
                  "HOSPITAL_COST_ORDER_MEDIAN_DESC",
                  "HOSPITAL_COST_ORDER_MIN_ASC",
                  "HOSPITAL_COST_ORDER_MIN_DESC",
                  "HOSPITAL_COST_ORDER_MAX_ASC",
                  "HOSPITAL_COST_ORDER_MAX_DESC",
                  "HOSPITAL_COST_ORDER_STD_DEV_ASC",
                  "HOSPITAL_COST_ORDER_STD_DEV_DESC",
                  "HOSPITAL_COST_ORDER_COEFFICIENT_OF_VARIATION_ASC",
                  "HOSPITAL_COST_ORDER_COEFFICIENT_OF_VARIATION_DESC"
                ],
                "type": "string",
                "description": "Result ordering. Unspecified (default) is HOSPITAL_COST_ORDER_RELEVANCE when query is set and HOSPITAL_COST_ORDER_HOSPITAL_ID otherwise. Ties break by hospital_id ascending. SAMPLE_COUNT_DESC/ASC order by the guaranteed pricing sample size (sample_count_sum_min); AVG/MEDIAN/MIN/MAX_ASC/DESC order by that price statistic; the *_ASC orders list hospitals with a 0 value (no price filed) last. STD_DEV_ASC/DESC order by how widely a hospital's own filed prices for the code vary (across payers, plans and settings, so contract mix counts as well as pricing discipline; it grows with price level). COEFFICIENT_OF_VARIATION_ASC/DESC order by std dev / average price, comparable across hospitals and procedures. page_token is only valid with the same order_by it was issued for."
              },
              "code_type": {
                "type": "string",
                "description": "Code system the chargemaster/billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC. Hospitals may also support additional proprietary code types not listed here."
              },
              "page_size": {
                "type": "integer",
                "description": "Maximum number of results to return. Defaults to 500 (covering every matching hospital in one call at the current registry size), capped at 500."
              },
              "page_token": {
                "type": "string",
                "description": "Opaque token from a previous list_hospital_code_costs response's next_page_token field. Omit for the first page. Only valid with the same code_type/code/methodology/min_sample_count/query/order_by it was issued for."
              },
              "methodology": {
                "enum": [
                  "case rate",
                  "fee schedule",
                  "other",
                  "percent of total billed charges",
                  "per diem"
                ],
                "type": "string",
                "description": "Pricing methodology. Omit to aggregate across all methodologies."
              },
              "min_sample_count": {
                "type": "integer",
                "description": "Minimum pricing sample size: only return hospitals whose price is backed by at least this many billing records (compared against the de-identified range's lower bound, so a '1 through 10' row counts as 1). 0 (default) disables the filter. Pass 1 to exclude hospitals with no real sample data at all (most filings report 0/0, indistinguishable from a genuine zero). total_count and next_page_token describe the filtered set. Negative values are rejected."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "boolean",
                      "description": "True if at least one entry in results was found."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cost": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "avg": {
                                "type": "string"
                              },
                              "max": {
                                "type": "string"
                              },
                              "min": {
                                "type": "string"
                              },
                              "code": {
                                "type": "string"
                              },
                              "median": {
                                "type": "string"
                              },
                              "std_dev": {
                                "type": "string"
                              },
                              "code_type": {
                                "type": "string"
                              },
                              "sample_count_exact": {
                                "type": "boolean",
                                "description": "True iff sample_count_sum_min == sample_count_sum_max, i.e. no contributing row was a de-identified '1 through 10' range."
                              },
                              "sample_count_sum_max": {
                                "type": "string",
                                "description": "Upper bound on the summed CMS sample-remittance count across contributing payer rows, as a decimal string (int64 - see protoLoaderOptions.longs). Equal to sample_count_sum_min unless a de-identified '1 through 10' row narrowed it to a range."
                              },
                              "sample_count_sum_min": {
                                "type": "string",
                                "description": "Lower bound on the summed CMS sample-remittance count across contributing payer rows, as a decimal string (int64 - see protoLoaderOptions.longs). Equal to sample_count_sum_max unless a de-identified '1 through 10' row narrowed it to a range."
                              }
                            }
                          },
                          "found": {
                            "type": "boolean",
                            "description": "Whether a matching chargemaster cost record was found for this methodology."
                          },
                          "description": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "location": {
                                "type": "string"
                              },
                              "hospital_name": {
                                "type": "string"
                              },
                              "code_description": {
                                "type": "string"
                              },
                              "methodology_note": {
                                "type": "string"
                              }
                            }
                          },
                          "methodology": {
                            "type": "string",
                            "description": "Methodology this entry is scoped to. Empty when aggregated across all methodologies (the request's methodology filter was left empty)."
                          }
                        }
                      },
                      "description": "One entry per requested methodology, in request order - or, when the methodology filter was left empty, exactly one aggregate entry."
                    },
                    "hospital": {
                      "type": "string",
                      "description": "Hospital name returned by the MedPrice AI backend."
                    },
                    "hospital_id": {
                      "type": "string",
                      "description": "Opaque hospital identifier to use with get_hospital_chargemaster_cost or list_hospitals."
                    }
                  }
                },
                "description": "One entry per hospital with a matching chargemaster entry for this code (its latest revision only) - hospitals with no data for this code are omitted, not returned with found=false."
              },
              "total_count": {
                "type": "integer",
                "description": "Total number of matching results across all pages, not just this page's results.length. Compare against results.length (plus any prior pages) to confirm you have the complete set before concluding a hospital or code has no data."
              },
              "next_page_token": {
                "type": "string",
                "description": "Opaque pagination token, empty when there are no more results."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_code_price_distribution",
          "title": "Get price distribution for a billing code",
          "description": "Returns the distribution of every hospital's price for a code_type/code, computed server-side: min/p10/q1/median/q3/p90/max, standard deviation, a histogram, and the real hospital nearest each percentile. Use this instead of paging through list_hospital_code_costs when you want to know how prices spread across hospitals (e.g. \"is $12k high for MS-DRG 788?\" - pass reference_price to get the number of hospitals priced below it). All figures are in terms of the chosen statistic (default: each hospital's average price). Served from the hospital-prices serving snapshot, which pools exactly (exact medians), so figures can differ slightly from earlier results of this tool. Like those, each figure still combines facility and professional charges (and all settings) into one number; use get_code_provider_price_distribution for a per-billing-class breakdown instead. With statistic MIN/MAX the figure is now the hospital's lowest/highest charge itself, not widened by the filing's per-item minimum/maximum.",
          "inputSchema": {
            "type": "object",
            "required": [
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "bin_count": {
                "type": "integer",
                "description": "Number of histogram bars. Defaults to 16, capped at 200 (larger values are rejected)."
              },
              "code_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              },
              "statistic": {
                "enum": [
                  "PRICE_STATISTIC_AVERAGE",
                  "PRICE_STATISTIC_MEDIAN",
                  "PRICE_STATISTIC_MIN",
                  "PRICE_STATISTIC_MAX"
                ],
                "type": "string",
                "description": "Which per-hospital figure to distribute: each hospital's average (default), median, lowest filed price, or highest filed price."
              },
              "methodology": {
                "enum": [
                  "case rate",
                  "fee schedule",
                  "other",
                  "percent of total billed charges",
                  "per diem"
                ],
                "type": "string",
                "description": "Pricing methodology. Omit to aggregate across all methodologies."
              },
              "reference_price": {
                "type": "number",
                "description": "Optional price to place on the distribution. When positive, hospitals_below_reference counts hospitals priced strictly below it. Negative values are rejected."
              },
              "min_sample_count": {
                "type": "integer",
                "description": "Minimum pricing sample size: only include hospitals whose price is backed by at least this many billing records (same semantics as list_hospital_code_costs). 0 (default) disables the filter. Negative values are rejected."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "q1": {
                "type": "number",
                "description": "25th percentile."
              },
              "q3": {
                "type": "number",
                "description": "75th percentile."
              },
              "max": {
                "type": "number"
              },
              "min": {
                "type": "number"
              },
              "p10": {
                "type": "number"
              },
              "p90": {
                "type": "number"
              },
              "mean": {
                "type": "number",
                "description": "Mean across hospitals of the request's statistic (a national average). 0 when hospital_count is 0."
              },
              "median": {
                "type": "number"
              },
              "std_dev": {
                "type": "number",
                "description": "Population standard deviation of the per-hospital values."
              },
              "q1_hospital": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "price": {
                    "type": "number",
                    "description": "This hospital's value of the requested statistic."
                  },
                  "location": {
                    "type": "string"
                  },
                  "hospital_id": {
                    "type": "string",
                    "description": "Opaque handle - pass back as hospital_id to other tools."
                  },
                  "hospital_name": {
                    "type": "string"
                  }
                },
                "description": "A real hospital and its price for the code, used to name a hospital at a percentile. Unset (absent or empty hospital_id) when hospital_count is 0."
              },
              "q3_hospital": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "price": {
                    "type": "number",
                    "description": "This hospital's value of the requested statistic."
                  },
                  "location": {
                    "type": "string"
                  },
                  "hospital_id": {
                    "type": "string",
                    "description": "Opaque handle - pass back as hospital_id to other tools."
                  },
                  "hospital_name": {
                    "type": "string"
                  }
                },
                "description": "A real hospital and its price for the code, used to name a hospital at a percentile. Unset (absent or empty hospital_id) when hospital_count is 0."
              },
              "histogram_hi": {
                "type": "number",
                "description": "Upper edge of the last bar: min(max, 1.35 * p90), or min + 1 when that is not above the minimum. Hospitals priced above this are counted in overflow_count."
              },
              "histogram_lo": {
                "type": "number",
                "description": "Lower edge of the first histogram bar (the minimum)."
              },
              "max_hospital": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "price": {
                    "type": "number",
                    "description": "This hospital's value of the requested statistic."
                  },
                  "location": {
                    "type": "string"
                  },
                  "hospital_id": {
                    "type": "string",
                    "description": "Opaque handle - pass back as hospital_id to other tools."
                  },
                  "hospital_name": {
                    "type": "string"
                  }
                },
                "description": "A real hospital and its price for the code, used to name a hospital at a percentile. Unset (absent or empty hospital_id) when hospital_count is 0."
              },
              "min_hospital": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "price": {
                    "type": "number",
                    "description": "This hospital's value of the requested statistic."
                  },
                  "location": {
                    "type": "string"
                  },
                  "hospital_id": {
                    "type": "string",
                    "description": "Opaque handle - pass back as hospital_id to other tools."
                  },
                  "hospital_name": {
                    "type": "string"
                  }
                },
                "description": "A real hospital and its price for the code, used to name a hospital at a percentile. Unset (absent or empty hospital_id) when hospital_count is 0."
              },
              "p10_hospital": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "price": {
                    "type": "number",
                    "description": "This hospital's value of the requested statistic."
                  },
                  "location": {
                    "type": "string"
                  },
                  "hospital_id": {
                    "type": "string",
                    "description": "Opaque handle - pass back as hospital_id to other tools."
                  },
                  "hospital_name": {
                    "type": "string"
                  }
                },
                "description": "A real hospital and its price for the code, used to name a hospital at a percentile. Unset (absent or empty hospital_id) when hospital_count is 0."
              },
              "p90_hospital": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "price": {
                    "type": "number",
                    "description": "This hospital's value of the requested statistic."
                  },
                  "location": {
                    "type": "string"
                  },
                  "hospital_id": {
                    "type": "string",
                    "description": "Opaque handle - pass back as hospital_id to other tools."
                  },
                  "hospital_name": {
                    "type": "string"
                  }
                },
                "description": "A real hospital and its price for the code, used to name a hospital at a percentile. Unset (absent or empty hospital_id) when hospital_count is 0."
              },
              "mean_hospital": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "price": {
                    "type": "number",
                    "description": "This hospital's value of the requested statistic."
                  },
                  "location": {
                    "type": "string"
                  },
                  "hospital_id": {
                    "type": "string",
                    "description": "Opaque handle - pass back as hospital_id to other tools."
                  },
                  "hospital_name": {
                    "type": "string"
                  }
                },
                "description": "A real hospital and its price for the code, used to name a hospital at a percentile. Unset (absent or empty hospital_id) when hospital_count is 0."
              },
              "histogram_bins": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "description": "Hospital count per equal-width bar from histogram_lo to histogram_hi; the last bar includes its upper edge."
              },
              "hospital_count": {
                "type": "integer",
                "description": "Hospitals with a positive value for the code on their latest revision (and at least min_sample_count samples, if set). 0 means every other field is unset."
              },
              "overflow_count": {
                "type": "integer",
                "description": "Hospitals priced above histogram_hi."
              },
              "median_hospital": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "price": {
                    "type": "number",
                    "description": "This hospital's value of the requested statistic."
                  },
                  "location": {
                    "type": "string"
                  },
                  "hospital_id": {
                    "type": "string",
                    "description": "Opaque handle - pass back as hospital_id to other tools."
                  },
                  "hospital_name": {
                    "type": "string"
                  }
                },
                "description": "A real hospital and its price for the code, used to name a hospital at a percentile. Unset (absent or empty hospital_id) when hospital_count is 0."
              },
              "hospitals_below_reference": {
                "type": "integer",
                "description": "Hospitals priced strictly below the request's reference_price; 0 when it was not set."
              }
            },
            "description": "A statistic ACROSS hospitals of one per-hospital value (the request's statistic: each hospital's average, median, min or max price). E.g. with statistic MEDIAN, `median` is the median across hospitals of each hospital's median price."
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_hospital_provider_code_costs",
          "title": "Get a hospital's provider charges for a code",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hospital_id",
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "group_by": {
                "enum": [
                  "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"
                ],
                "type": "string",
                "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), 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_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              },
              "hospital_id": {
                "type": "string",
                "description": "Opaque hospital identifier from list_hospitals."
              },
              "revision_id": {
                "type": "string",
                "description": "Optional. A revision_id from list_hospitals' per-hospital revisions array. Omit for the latest revision."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "batch_get_hospital_provider_code_costs",
          "title": "Batch get a hospital's provider charges",
          "description": "Batch counterpart to get_hospital_provider_code_costs: one hospital's provider charges for 1 to 100 codes in a single call, results in request order. A code the hospital doesn't charge is an entry with no costs, not an error. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hospital_id",
              "codes"
            ],
            "properties": {
              "codes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code_type",
                    "code"
                  ],
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "code_type": {
                      "type": "string"
                    }
                  }
                },
                "maxItems": 100,
                "minItems": 1
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "group_by": {
                "enum": [
                  "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"
                ],
                "type": "string",
                "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), 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)."
              },
              "hospital_id": {
                "type": "string",
                "description": "Opaque hospital identifier from list_hospitals."
              },
              "revision_id": {
                "type": "string",
                "description": "Optional. A revision_id from list_hospitals. Omit for the latest revision."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_hospital_provider_codes",
          "title": "List the codes a hospital charges",
          "description": "Lists the codes one hospital reports on its latest (or a given) revision, as list_codes does, each with that hospital's own all-terms sample counts. Paginated; supports query, sort and code_type like list_codes. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hospital_id"
            ],
            "properties": {
              "sort": {
                "enum": [
                  "CODE_SORT_UNSPECIFIED",
                  "CODE_SORT_HOSPITAL_COUNT_DESC",
                  "CODE_SORT_SAMPLE_COUNT_DESC",
                  "CODE_SORT_CODE_DESC",
                  "CODE_SORT_RELEVANCE",
                  "CODE_SORT_HOSPITAL_COUNT_ASC",
                  "CODE_SORT_SAMPLE_COUNT_ASC",
                  "CODE_SORT_MEDIAN_PRICE_DESC",
                  "CODE_SORT_MEDIAN_PRICE_ASC",
                  "CODE_SORT_PRICE_SPREAD_DESC",
                  "CODE_SORT_FACILITY_MEDIAN_PRICE_DESC",
                  "CODE_SORT_PROFESSIONAL_MEDIAN_PRICE_DESC",
                  "CODE_SORT_FACILITY_SHARE_DESC",
                  "CODE_SORT_FACILITY_SHARE_ASC",
                  "CODE_SORT_FACILITY_MEDIAN_PRICE_ASC",
                  "CODE_SORT_PROFESSIONAL_MEDIAN_PRICE_ASC"
                ],
                "type": "string"
              },
              "query": {
                "type": "string",
                "description": "Optional case-insensitive search over code prefix and descriptions."
              },
              "code_type": {
                "type": "string",
                "description": "Code system to list, e.g. CPT. Required unless query is set; with query it may be left empty to search across code types (CodeSummary.code_type tells the hits apart)."
              },
              "page_size": {
                "type": "integer"
              },
              "page_token": {
                "type": "string",
                "description": "Opaque next_page_token from a previous response; only valid with the same request fields."
              },
              "hospital_id": {
                "type": "string",
                "description": "Opaque hospital identifier from list_hospitals."
              },
              "revision_id": {
                "type": "string",
                "description": "Optional. A revision_id from list_hospitals. Omit for the latest revision."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_code_provider_hospitals",
          "title": "List hospitals' provider charges for a code",
          "description": "Each hospital's charges for a (code_type, code), one row per hospital and group of the group_by grouping (default: per billing class, methodology and setting; GROUP_BY_ALL gives one row per hospital), paginated. The billing-class-aware counterpart to list_hospital_code_costs, good for 'which hospital is cheapest for X'. Defaults/caps page_size at 500; includes total_count and hospital_count. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "query": {
                "type": "string",
                "description": "Optional case-insensitive hospital-name search."
              },
              "state": {
                "type": "string",
                "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."
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "group_by": {
                "enum": [
                  "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"
                ],
                "type": "string",
                "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), 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)."
              },
              "order_by": {
                "enum": [
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_UNSPECIFIED",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_AVG_ASC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_AVG_DESC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_MEDIAN_ASC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_MEDIAN_DESC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_MIN_ASC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_MIN_DESC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_MAX_ASC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_MAX_DESC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_HOSPITAL_ID",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_RELEVANCE",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_SAMPLE_COUNT_DESC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_SAMPLE_COUNT_ASC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_STD_DEV_ASC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_STD_DEV_DESC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_COEFFICIENT_OF_VARIATION_ASC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_COEFFICIENT_OF_VARIATION_DESC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_MEDIAN_PCT_ASC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_MEDIAN_PCT_DESC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_AVG_PCT_ASC",
                  "HOSPITAL_PROVIDER_CODE_COST_ORDER_AVG_PCT_DESC"
                ],
                "type": "string",
                "description": "Defaults to relevance when query is set, hospital id otherwise."
              },
              "code_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              },
              "page_size": {
                "type": "integer"
              },
              "page_token": {
                "type": "string",
                "description": "Opaque next_page_token from a previous response; only valid with the same request fields."
              },
              "min_sample_count": {
                "type": "integer",
                "description": "Only rows backed by at least this many billing records (compared against the sample count's lower bound). Negative values are rejected."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_code_provider_price_distribution",
          "title": "Get provider price distribution for a code",
          "description": "Distribution (min/p10/q1/median/q3/p90/max, std dev, histogram, nearest hospital per percentile) of one figure per hospital for a code, never blending billing classes. The filter must name every term the group_by grouping keeps (all three of billing_class, methodology and setting for the default; the billing class or the methodology for those groupings; nothing for GROUP_BY_ALL), else INVALID_ARGUMENT; use *_UNSPECIFIED for 'not filed'. Counterpart to get_code_price_distribution. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "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."
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "group_by": {
                "enum": [
                  "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"
                ],
                "type": "string",
                "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), 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)."
              },
              "bin_count": {
                "type": "integer",
                "description": "Histogram bars. Defaults to 16, max 200."
              },
              "code_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              },
              "statistic": {
                "enum": [
                  "PRICE_STATISTIC_AVERAGE",
                  "PRICE_STATISTIC_MEDIAN",
                  "PRICE_STATISTIC_MIN",
                  "PRICE_STATISTIC_MAX",
                  "PRICE_STATISTIC_PERCENT_OF_CHARGES_AVERAGE",
                  "PRICE_STATISTIC_PERCENT_OF_CHARGES_MEDIAN"
                ],
                "type": "string",
                "description": "Which per-hospital figure to distribute (default average). The PERCENT_OF_CHARGES_* values distribute the percentage of billed charges of rows filed under the percent-of-total-billed-charges methodology instead of dollars (every value in the response is then in whole percent; hospitals with no such row are left out); best with the methodology named in the filter."
              },
              "reference_price": {
                "type": "number",
                "description": "When positive, hospitals_below_reference counts hospitals priced strictly below it."
              },
              "min_sample_count": {
                "type": "integer",
                "description": "Only hospitals backed by at least this many billing records. Negative values are rejected."
              },
              "include_class_breakdown": {
                "type": "boolean",
                "description": "Also return `facility` and `professional` (median and hospital count of each billing class's per-hospital figures, the same as one call per class, no histogram) so a facility-vs-professional comparison needs one call. Both classes are always returned whatever billing class the filter names; they follow state, the filter's methodology and whether group_by is GROUP_BY_ALL_EXCEPT_PER_DIEM."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_code_provider_terms_summary",
          "title": "Summarize the price terms hospitals file a code under",
          "description": "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.",
          "inputSchema": {
            "type": "object",
            "required": [
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "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."
              },
              "group_by": {
                "enum": [
                  "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"
                ],
                "type": "string",
                "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), 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_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              },
              "min_sample_count": {
                "type": "integer",
                "description": "Only count hospitals whose figure has at least this many billing records (same rule as list_code_provider_hospitals). Negative values are rejected."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_code_payers",
          "title": "List payers' negotiated rates for a code",
          "description": "Every insurer (payer) with a negotiated rate for a (code_type, code), one summary per payer and billing class/methodology/setting, across hospitals, most hospitals first: hospital_count, count_rate, min/avg/median-of-hospital-averages/max rate and the price terms. Billing classes, methodologies and settings are never blended. Use the returned payer_slug (e.g. \"aetna\") with list_code_payer_hospitals. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "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."
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "code_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_hospital_code_payer_rates",
          "title": "Get a hospital's payer plan rates for a code",
          "description": "Every plan rate (per payer and plan, with price terms) one hospital files for a (code_type, code), cheapest average first. Pass revision_id (from list_hospitals) to answer for a past filing. NOT_FOUND when the hospital has no payer rates at all; an empty rates list when it has some but none for this code. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hospital_id",
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "code_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              },
              "hospital_id": {
                "type": "string",
                "description": "A hospital_id from list_hospitals."
              },
              "revision_id": {
                "type": "string",
                "description": "Optional revision_id from list_hospitals; defaults to the hospital's latest revision."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_code_payer_hospitals",
          "title": "List one payer's rates for a code across hospitals",
          "description": "One payer's rate for a (code_type, code) at each hospital, one row per hospital and billing class/methodology/setting, paginated, rolled up across the payer's plans there. Good for 'which hospital is cheapest for Aetna members'. Defaults/caps page_size at 500; includes total_count. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "code_type",
              "code",
              "payer_slug"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "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."
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "order_by": {
                "enum": [
                  "HOSPITAL_PAYER_RATE_ORDER_UNSPECIFIED",
                  "AVG_ASC",
                  "AVG_DESC",
                  "MIN_ASC",
                  "MAX_DESC",
                  "HOSPITAL_NAME",
                  "MEDIAN_ASC",
                  "MEDIAN_DESC",
                  "MIN_DESC",
                  "MAX_ASC",
                  "STD_DEV_ASC",
                  "STD_DEV_DESC",
                  "COEFFICIENT_OF_VARIATION_ASC",
                  "COEFFICIENT_OF_VARIATION_DESC",
                  "SAMPLE_COUNT_ASC",
                  "SAMPLE_COUNT_DESC",
                  "MEDIAN_PCT_ASC",
                  "MEDIAN_PCT_DESC",
                  "AVG_PCT_ASC",
                  "AVG_PCT_DESC"
                ],
                "type": "string",
                "description": "Defaults to AVG_ASC (cheapest average first). STD_DEV_* orders by how widely the payer's rates vary at a hospital, COEFFICIENT_OF_VARIATION_* by that spread relative to the price level (comparable across hospitals); pair those with min_sample_count since thin filings have an artificially low spread. MEDIAN_PCT_*/AVG_PCT_* order by the percentage of billed charges of rows filed under the percent-of-total-billed-charges methodology (dollar-only figures last)."
              },
              "code_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              },
              "page_size": {
                "type": "integer"
              },
              "page_token": {
                "type": "string",
                "description": "Opaque next_page_token from a previous response; only valid with the same request fields."
              },
              "payer_slug": {
                "type": "string",
                "description": "A payer_slug from list_code_payers, e.g. \"aetna\"."
              },
              "min_sample_count": {
                "type": "integer",
                "description": "Only hospitals whose figure has at least this many billing records (sample count lower bound). 0 keeps every hospital; negative is rejected."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_code_payer_price_distribution",
          "title": "Get one payer's price distribution for a code",
          "description": "Distribution (min/p10/q1/median/q3/p90/max, std dev, histogram, nearest hospital per percentile) of one payer's rate for a (code_type, code) across hospitals, one figure per hospital; the payer-specific counterpart to get_code_provider_price_distribution. The filter must name every term the group_by grouping keeps, else INVALID_ARGUMENT. Pass plan_slug (from list_payer_plans) to distribute one plan's rates alone; MEDIAN is then only valid with PAYER_GROUP_BY_PER_COMBINATION. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "code_type",
              "code",
              "payer_slug"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "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."
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "group_by": {
                "enum": [
                  "PAYER_GROUP_BY_PER_COMBINATION",
                  "PAYER_GROUP_BY_BILLING_CLASS",
                  "PAYER_GROUP_BY_METHODOLOGY",
                  "PAYER_GROUP_BY_ALL",
                  "PAYER_GROUP_BY_ALL_EXCEPT_PER_DIEM"
                ],
                "type": "string",
                "description": "How a hospital's rates are grouped (default PAYER_GROUP_BY_PER_COMBINATION: per billing class + methodology + setting). The filter must name every term the grouping keeps (PAYER_GROUP_BY_ALL with no filter, PAYER_GROUP_BY_BILLING_CLASS plus a billing_class, PAYER_GROUP_BY_METHODOLOGY plus a methodology, per-combination all three; PAYER_GROUP_BY_ALL_EXCEPT_PER_DIEM is one figure like ALL but without the per diem rows, so a day rate does not pull a stay's price down), else INVALID_ARGUMENT."
              },
              "bin_count": {
                "type": "integer",
                "description": "Histogram bars. Defaults to 16, max 200."
              },
              "code_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              },
              "plan_slug": {
                "type": "string",
                "description": "Optional plan_slug from list_payer_plans: distribute that plan's rates alone (hospitals not filing the plan are left out). Empty means the payer as a whole."
              },
              "statistic": {
                "enum": [
                  "PRICE_STATISTIC_UNSPECIFIED",
                  "PRICE_STATISTIC_AVERAGE",
                  "PRICE_STATISTIC_MEDIAN",
                  "PRICE_STATISTIC_MIN",
                  "PRICE_STATISTIC_MAX",
                  "PRICE_STATISTIC_PERCENT_OF_CHARGES_AVERAGE",
                  "PRICE_STATISTIC_PERCENT_OF_CHARGES_MEDIAN"
                ],
                "type": "string",
                "description": "Which figure to distribute (default average)."
              },
              "payer_slug": {
                "type": "string",
                "description": "A payer_slug from list_payers or list_code_payers, e.g. \"aetna\"."
              },
              "reference_price": {
                "type": "number",
                "description": "When positive, the response counts how many are priced strictly below it."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_code_payers_price_distribution",
          "title": "Compare payers' prices for a code",
          "description": "Distribution of a code's price across payers, one figure per payer (how the payers compare), the third view beside get_code_provider_price_distribution (over hospitals) and get_code_payer_price_distribution (over one payer's hospitals). The filter must name every term the group_by grouping keeps, else INVALID_ARGUMENT. Each payer is reduced to one figure over its hospitals (average weighted by rate lines; MEDIAN is the median of the hospitals' averages; MIN/MAX the lowest/highest hospital row). Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "code_type",
              "code"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "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."
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "group_by": {
                "enum": [
                  "PAYER_GROUP_BY_PER_COMBINATION",
                  "PAYER_GROUP_BY_BILLING_CLASS",
                  "PAYER_GROUP_BY_METHODOLOGY",
                  "PAYER_GROUP_BY_ALL",
                  "PAYER_GROUP_BY_ALL_EXCEPT_PER_DIEM"
                ],
                "type": "string",
                "description": "How a hospital's rates are grouped (default PAYER_GROUP_BY_PER_COMBINATION: per billing class + methodology + setting). The filter must name every term the grouping keeps (PAYER_GROUP_BY_ALL with no filter, PAYER_GROUP_BY_BILLING_CLASS plus a billing_class, PAYER_GROUP_BY_METHODOLOGY plus a methodology, per-combination all three; PAYER_GROUP_BY_ALL_EXCEPT_PER_DIEM is one figure like ALL but without the per diem rows, so a day rate does not pull a stay's price down), else INVALID_ARGUMENT."
              },
              "bin_count": {
                "type": "integer",
                "description": "Histogram bars. Defaults to 16, max 200."
              },
              "code_type": {
                "type": "string",
                "description": "Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC."
              },
              "statistic": {
                "enum": [
                  "PRICE_STATISTIC_UNSPECIFIED",
                  "PRICE_STATISTIC_AVERAGE",
                  "PRICE_STATISTIC_MEDIAN",
                  "PRICE_STATISTIC_MIN",
                  "PRICE_STATISTIC_MAX",
                  "PRICE_STATISTIC_PERCENT_OF_CHARGES_AVERAGE",
                  "PRICE_STATISTIC_PERCENT_OF_CHARGES_MEDIAN"
                ],
                "type": "string",
                "description": "Which figure to distribute (default average)."
              },
              "reference_price": {
                "type": "number",
                "description": "When positive, the response counts how many are priced strictly below it."
              },
              "min_hospital_count": {
                "type": "integer",
                "description": "Leave out payers filed by fewer hospitals than this (0 or 1: none). Negative is rejected."
              },
              "include_class_breakdown": {
                "type": "boolean",
                "description": "Also return `facility` and `professional` (median price over payers and payer_count for each billing class, always both, for a facility-vs-professional comparison in one call). Only answered for a national request (no state, average statistic, min_hospital_count 0/1, a filter naming no methodology or setting); otherwise they are left unset."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_payers",
          "title": "List payers",
          "description": "Every insurer (payer) in the snapshot, independent of any code, most hospitals first, with display_name, hospital_count, code_count and payer_rate_rows. About 70, so unpaginated. Use the payer_slug with get_payer, list_payer_plans, list_payer_hospitals and the code-level payer tools. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "state": {
                "type": "string",
                "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."
              },
              "min_hospital_count": {
                "type": "integer",
                "description": "Leave out payers filed by fewer hospitals than this, to drop the long tail. 0 (default) returns all."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "get_payer",
          "title": "Get a payer",
          "description": "One payer's header: display name and counts, plus its top codes (grouped like the provider RPCs; the filter may name only terms the grouping keeps) and the states it appears in. state narrows only the payer's counts: top_codes stay network-wide. NOT_FOUND when no hospital in the state files the payer. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "payer_slug"
            ],
            "properties": {
              "state": {
                "type": "string",
                "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."
              },
              "filter": {
                "type": "object",
                "properties": {
                  "setting": {
                    "enum": [
                      "SETTING_UNSPECIFIED",
                      "SETTING_INPATIENT",
                      "SETTING_OUTPATIENT",
                      "SETTING_BOTH",
                      "SETTING_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "methodology": {
                    "enum": [
                      "METHODOLOGY_UNSPECIFIED",
                      "METHODOLOGY_CASE_RATE",
                      "METHODOLOGY_FEE_SCHEDULE",
                      "METHODOLOGY_OTHER",
                      "METHODOLOGY_PERCENT_OF_TOTAL_BILLED_CHARGES",
                      "METHODOLOGY_PER_DIEM",
                      "METHODOLOGY_UNKNOWN"
                    ],
                    "type": "string"
                  },
                  "billing_class": {
                    "enum": [
                      "BILLING_CLASS_UNSPECIFIED",
                      "BILLING_CLASS_PROFESSIONAL",
                      "BILLING_CLASS_FACILITY",
                      "BILLING_CLASS_BOTH",
                      "BILLING_CLASS_UNKNOWN"
                    ],
                    "type": "string"
                  }
                },
                "description": "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."
              },
              "group_by": {
                "enum": [
                  "PAYER_GROUP_BY_PER_COMBINATION",
                  "PAYER_GROUP_BY_BILLING_CLASS",
                  "PAYER_GROUP_BY_METHODOLOGY",
                  "PAYER_GROUP_BY_ALL",
                  "PAYER_GROUP_BY_ALL_EXCEPT_PER_DIEM"
                ],
                "type": "string",
                "description": "How a hospital's rates are grouped (default PAYER_GROUP_BY_PER_COMBINATION: per billing class + methodology + setting). The filter must name every term the grouping keeps (PAYER_GROUP_BY_ALL with no filter, PAYER_GROUP_BY_BILLING_CLASS plus a billing_class, PAYER_GROUP_BY_METHODOLOGY plus a methodology, per-combination all three; PAYER_GROUP_BY_ALL_EXCEPT_PER_DIEM is one figure like ALL but without the per diem rows, so a day rate does not pull a stay's price down), else INVALID_ARGUMENT."
              },
              "payer_slug": {
                "type": "string",
                "description": "A payer_slug from list_payers or list_code_payers, e.g. \"aetna\"."
              },
              "top_code_count": {
                "type": "integer",
                "description": "How many top codes to return. Defaults to 10, capped at 100."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_payer_plans",
          "title": "List a payer's plans",
          "description": "The plans a payer is filed under, most hospitals first, paginated: plan_slug, plan name, hospital_count, code_count, payer_rate_rows and filed_rate_count. Use plan_slug with get_code_payer_price_distribution. Includes total_count. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "payer_slug"
            ],
            "properties": {
              "state": {
                "type": "string",
                "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."
              },
              "page_size": {
                "type": "integer",
                "description": "Defaults/caps at 500."
              },
              "page_token": {
                "type": "string",
                "description": "Opaque next_page_token from a previous response; only valid with the same request fields."
              },
              "payer_slug": {
                "type": "string",
                "description": "A payer_slug from list_payers or list_code_payers, e.g. \"aetna\"."
              },
              "min_hospital_count": {
                "type": "integer",
                "description": "Leave out plans filed by fewer hospitals than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_hospital_plans",
          "title": "List the plans a hospital files rates under",
          "description": "The payers and plans one hospital files negotiated rates under, across all its codes, most codes first, paginated, with code_count, payer_rate_rows and filed_rate_count. Includes total_count. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hospital_id"
            ],
            "properties": {
              "page_size": {
                "type": "integer",
                "description": "Defaults/caps at 500."
              },
              "page_token": {
                "type": "string",
                "description": "Opaque next_page_token from a previous response; only valid with the same request fields."
              },
              "payer_slug": {
                "type": "string",
                "description": "Optional: only this payer's plans."
              },
              "hospital_id": {
                "type": "string",
                "description": "A hospital_id from list_hospitals."
              },
              "min_code_count": {
                "type": "integer",
                "description": "Leave out plans with fewer codes than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_hospital_payers",
          "title": "List the payers a hospital files rates for",
          "description": "A hospital's payers rolled up from its plans, most plans first: display_name, plan_count, payer_rate_rows and filed_rate_count. Unpaginated. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "hospital_id"
            ],
            "properties": {
              "hospital_id": {
                "type": "string",
                "description": "A hospital_id from list_hospitals."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_payer_hospitals",
          "title": "List the hospitals that file a payer",
          "description": "The hospitals that file a payer across all codes, optionally in one state, paginated: plan_count, payer_rate_rows and filed_rate_count per hospital. Includes total_count. For one payer's rates for a specific code use list_code_payer_hospitals. Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.",
          "inputSchema": {
            "type": "object",
            "required": [
              "payer_slug"
            ],
            "properties": {
              "query": {
                "type": "string",
                "description": "Optional case-insensitive hospital-name search."
              },
              "state": {
                "type": "string",
                "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."
              },
              "order_by": {
                "enum": [
                  "PAYER_HOSPITAL_ORDER_UNSPECIFIED",
                  "PAYER_HOSPITAL_ORDER_RATE_ROWS_DESC",
                  "PAYER_HOSPITAL_ORDER_PLAN_COUNT_DESC",
                  "PAYER_HOSPITAL_ORDER_HOSPITAL_NAME"
                ],
                "type": "string",
                "description": "Defaults to PAYER_HOSPITAL_ORDER_RATE_ROWS_DESC."
              },
              "page_size": {
                "type": "integer",
                "description": "Defaults/caps at 500."
              },
              "page_token": {
                "type": "string",
                "description": "Opaque next_page_token from a previous response; only valid with the same request fields."
              },
              "payer_slug": {
                "type": "string",
                "description": "A payer_slug from list_payers or list_code_payers, e.g. \"aetna\"."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_code_types",
          "title": "List billing code types",
          "description": "Returns every distinct code_type (e.g. CPT, MS-DRG) with catalogued cost data, along with each type's distinct code count and total hospital reports. Unpaginated. Use this to discover which code systems have data before drilling into list_codes.",
          "inputSchema": {
            "type": "object",
            "properties": {}
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "code_types": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code_type": {
                      "type": "string",
                      "description": "e.g. \"CPT\""
                    },
                    "code_count": {
                      "type": "integer",
                      "description": "Distinct codes catalogued under this type."
                    },
                    "total_hospital_reports": {
                      "type": "integer",
                      "description": "Sum of hospital_count across every code under this type - NOT a distinct-hospital count (a hospital reporting many codes under one type is counted once per code)."
                    }
                  }
                },
                "description": "One entry per distinct code_type present in the catalog, most code-rich first. Unpaginated."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        },
        {
          "name": "list_codes",
          "title": "List billing codes for a code type",
          "description": "Returns every distinct code catalogued under a given code_type, paginated, with each code's raw chargemaster description and the number of hospitals reporting it. Use this to discover which codes exist under a code system (e.g. all CPT codes) before looking up prices with get_hospital_chargemaster_cost or list_hospital_code_costs. Pass query to text-search codes/descriptions instead of listing a whole code_type. Pass hospital_id to restrict results to codes that one hospital actually reports.",
          "inputSchema": {
            "type": "object",
            "required": [],
            "properties": {
              "sort": {
                "enum": [
                  "CODE_SORT_UNSPECIFIED",
                  "CODE_SORT_HOSPITAL_COUNT_DESC",
                  "CODE_SORT_SAMPLE_COUNT_DESC",
                  "CODE_SORT_CODE_DESC",
                  "CODE_SORT_RELEVANCE",
                  "CODE_SORT_HOSPITAL_COUNT_ASC",
                  "CODE_SORT_SAMPLE_COUNT_ASC",
                  "CODE_SORT_MEDIAN_PRICE_DESC",
                  "CODE_SORT_MEDIAN_PRICE_ASC",
                  "CODE_SORT_PRICE_SPREAD_DESC",
                  "CODE_SORT_FACILITY_MEDIAN_PRICE_DESC",
                  "CODE_SORT_PROFESSIONAL_MEDIAN_PRICE_DESC",
                  "CODE_SORT_FACILITY_SHARE_DESC",
                  "CODE_SORT_FACILITY_SHARE_ASC",
                  "CODE_SORT_FACILITY_MEDIAN_PRICE_ASC",
                  "CODE_SORT_PROFESSIONAL_MEDIAN_PRICE_ASC"
                ],
                "type": "string",
                "description": "Ordering for the returned codes. CODE_SORT_UNSPECIFIED (default) sorts code-alphabetical. CODE_SORT_HOSPITAL_COUNT_DESC sorts most-hospitals-reporting first, for pre-sorted 'top codes' pages. CODE_SORT_SAMPLE_COUNT_DESC sorts by largest network-wide pricing sample size first (sample_count_max, always network-wide regardless of hospital_id) - ranks by how many billing records actually back a code's pricing, rather than by how many hospitals merely report it. CODE_SORT_CODE_DESC is code-alphabetical, reverse order. CODE_SORT_RELEVANCE ranks best text match first (exact code, then code prefix, then description word-start, then description substring), ties broken by network-wide sample count descending, and is only meaningful - and the default - when query is set; without a query it behaves like CODE_SORT_SAMPLE_COUNT_DESC. CODE_SORT_HOSPITAL_COUNT_ASC / CODE_SORT_SAMPLE_COUNT_ASC surface rare codes (fewest hospitals / smallest network-wide sample first; zero counts sort last). CODE_SORT_MEDIAN_PRICE_DESC/ASC order by the network-wide median price (CodeSummary.median_price) and CODE_SORT_PRICE_SPREAD_DESC by the widest hospital-to-hospital spread (price_spread); codes with no price sort last in every price order. Price figures are network-wide even when hospital_id is set, and blend billing classes, methodologies and settings. Billing-class orders (upstream #2144, list_codes only): CODE_SORT_FACILITY_MEDIAN_PRICE_DESC/ASC and CODE_SORT_PROFESSIONAL_MEDIAN_PRICE_DESC/ASC rank by that class's median price; CODE_SORT_FACILITY_SHARE_DESC (mostly-facility codes first) / _ASC (mostly-professional first) rank by facility_share. Codes lacking the figure, or with fewer hospitals than min_class_hospital_count, sort last."
              },
              "query": {
                "type": "string",
                "description": "Case-insensitive text search: matches the code as a prefix, and substrings of the raw and AI-generated descriptions. Descriptions are only searched for queries of 4+ characters; shorter queries match the code prefix only. When set, code_type may be left empty to search across code types."
              },
              "code_type": {
                "type": "string",
                "description": "Code system to list codes for, e.g. \"CPT\". From list_code_types. May be left empty when query is set, to search across code types (excluding hospital-specific CDM and LOCAL codes) - CodeSummary.code_type tells the hits apart in that case."
              },
              "page_size": {
                "type": "integer",
                "description": "Maximum number of results to return. Defaults to 500, capped at 500."
              },
              "page_token": {
                "type": "string",
                "description": "Opaque token from a previous list_codes response. Omit for the first page. Only valid with the same query/code_type/sort it was issued for."
              },
              "hospital_id": {
                "type": "string",
                "description": "Optional hospital scoping (a hospital_id from list_hospitals): restricts results to codes that hospital actually reports on its latest revision, and makes sample_count_min/max/exact that hospital's own sample size for the code rather than the network-wide total. Unset (default) is network-wide. page_token is only valid with the same hospital_id it was issued for, same as query/code_type/sort."
              },
              "min_class_hospital_count": {
                "type": "integer",
                "description": "Minimum hospitals behind a billing class's median for the class orders (facility/professional median price: that class; facility share: both classes). A code below it sorts last but is still listed. Without it a code one hospital files can top the share lists. Ignored by other sorts and with hospital_id; negative is INVALID_ARGUMENT."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "properties": {
              "codes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "code_type": {
                      "type": "string",
                      "description": "This code's type, e.g. \"CPT\". Always set - distinguishes hits when query was searched across code types (code_type left empty in the request)."
                    },
                    "priced_at": {
                      "type": "object",
                      "properties": {
                        "nanos": {
                          "type": "integer"
                        },
                        "seconds": {
                          "type": "string"
                        }
                      },
                      "description": "When the snapshot the price figures come from was published (protobuf Timestamp: seconds, nanos); recomputed with each snapshot."
                    },
                    "median_price": {
                      "type": "number",
                      "description": "Network-wide price: the median of the hospitals' average prices for this code, taken over all billing classes, methodologies and settings (so facility and professional fees are blended). Unset when no hospital has a positive average price. Always network-wide, even when hospital_id is set."
                    },
                    "price_spread": {
                      "type": "number",
                      "description": "p90 / p10 of the hospitals' average prices for this code. Unset when median_price is."
                    },
                    "ai_description": {
                      "type": "string",
                      "description": "LLM-normalized, human-readable description. Empty when not yet backfilled - fall back to raw_description."
                    },
                    "facility_share": {
                      "type": "number",
                      "description": "facility_median_price / (facility + professional median) as a percent with 2 decimals; the professional share is 100 minus it. Unset unless both medians are."
                    },
                    "hospital_count": {
                      "type": "integer",
                      "description": "Distinct hospitals reporting this code (latest revision only)."
                    },
                    "raw_description": {
                      "type": "string",
                      "description": "Raw chargemaster text, picked across reporting hospitals. Not necessarily a human-readable procedure name."
                    },
                    "sample_count_max": {
                      "type": "string",
                      "description": "Upper bound on the CMS sample-remittance count, as a decimal string (int64 - see protoLoaderOptions.longs), same network-wide-vs-hospital-scoped convention as sample_count_min. Equal to sample_count_min unless a de-identified '1 through 10' row narrowed it to a range."
                    },
                    "sample_count_min": {
                      "type": "string",
                      "description": "Lower bound on the CMS sample-remittance count, as a decimal string (int64 - see protoLoaderOptions.longs). By default (no hospital_id in the request) this sums every reporting hospital's contributing payer rows, network-wide; when the request scopes to a hospital_id, it's that one hospital's own sample count for this code instead. Equal to sample_count_max unless a de-identified '1 through 10' row narrowed it to a range."
                    },
                    "sample_count_exact": {
                      "type": "boolean",
                      "description": "True iff sample_count_min == sample_count_max, i.e. no contributing row was a de-identified '1 through 10' range."
                    },
                    "facility_median_price": {
                      "type": "number",
                      "description": "Network-wide median over hospitals of each hospital's average price under the facility billing class (unlike median_price, not blended). Unset when no hospital files the class. Network-wide even when hospital_id is set."
                    },
                    "priced_hospital_count": {
                      "type": "integer",
                      "description": "Hospitals with a positive average price behind median_price and price_spread."
                    },
                    "facility_hospital_count": {
                      "type": "integer",
                      "description": "Hospitals behind facility_median_price."
                    },
                    "professional_median_price": {
                      "type": "number",
                      "description": "As facility_median_price, for the professional billing class."
                    },
                    "professional_hospital_count": {
                      "type": "integer",
                      "description": "Hospitals behind professional_median_price."
                    }
                  }
                }
              },
              "total_count": {
                "type": "integer",
                "description": "Total number of matching codes across all pages."
              },
              "next_page_token": {
                "type": "string",
                "description": "Opaque pagination token, empty when there are no more results."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "destructiveHint": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [],
      "prompts": []
    },
    "instructions": null
  },
  "changes": {
    "total": 0,
    "latest": []
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}