{"openapi":"3.0.3","info":{"title":"Gnist Context — CMS Open Data (Medicare & Medicaid)","description":"US hospital quality ratings, provider/clinician search, and Medicare spending data from the CMS Provider Data Catalog — search hospitals by name or state, get quality measures, find Medicare-enrolled doctors, and compare spending per beneficiary.\n\n- **MCP endpoint:** `https://context.gnist.ai/mcp/cms/`\n- **Toolkit page:** `/toolkits/cms`\n- **Full API spec:** `/api/openapi.json`\n- **Get an API key:** `/signup`","version":"1.0.0","contact":{"name":"GnistAI","url":"https://gnist.ai"}},"servers":[{"url":"https://context.gnist.ai","description":"Production"}],"paths":{"/rest/cms/search_hospitals":{"post":{"tags":["Health"],"summary":"search_hospitals","description":"Search US hospitals by name, city, or state using CMS General Information data.\n\nReturns hospital name, address, type, ownership, emergency services availability,\nand overall CMS star rating. Data is sourced from the CMS Provider Data Catalog\nand is updated quarterly.\n\nArgs:\n    query: Free-text search matched against hospital name and city.\n    state: Two-letter US state code to filter results.\n    limit: Maximum hospitals to return (1-50, default 10).\n\nReturns:\n    List of hospitals with name, location, type, ownership, and star rating.","operationId":"cms_search_hospitals","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"query":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Free-text search string matched against hospital name and city (e.g. \"Mayo Clinic\", \"Houston\")."},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter US state code to filter results (e.g. \"CA\", \"NY\", \"TX\")."},"limit":{"default":10,"description":"Maximum number of hospitals to return (1-50, default 10).","type":"integer"}},"type":"object"}}}}}},"/rest/cms/get_hospital_quality":{"post":{"tags":["Health"],"summary":"get_hospital_quality","description":"Get quality measures for a specific hospital by its CMS facility ID.\n\nReturns clinical quality scores, patient safety measures, patient experience\nratings, and how each measure compares to national benchmarks. Includes\nmeasure start/end dates and any applicable footnotes.\n\nArgs:\n    facility_id: 6-digit CMS facility ID (e.g. \"050324\").\n\nReturns:\n    Quality measures with scores, national comparison, and date ranges.","operationId":"cms_get_hospital_quality","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"facility_id":{"description":"6-digit CMS facility ID for the hospital (e.g. \"050324\"). Use search_hospitals to find IDs.","type":"string"}},"required":["facility_id"],"type":"object"}}}}}},"/rest/cms/search_providers":{"post":{"tags":["Health"],"summary":"search_providers","description":"Search doctors and clinicians in the NPPES NPI Registry.\n\nReturns provider name, credentials, NPI number, primary specialty, practice\naddress, and phone number. At least name or specialty must be provided;\nstate alone is not sufficient.\n\nArgs:\n    name: Provider last name.\n    state: Two-letter US state code.\n    specialty: Medical specialty (e.g. \"Internal Medicine\", \"Cardiology\").\n    limit: Maximum providers to return (1-50, default 10).\n\nReturns:\n    Provider list with NPI, name, specialty, credentials, and location.","operationId":"cms_search_providers","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Provider last name or organization name to search (e.g. \"Smith\", \"Cleveland Clinic\")."},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter US state code (e.g. \"OH\", \"FL\")."},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Medical specialty to filter by (e.g. \"Internal Medicine\", \"Cardiology\")."},"limit":{"default":10,"description":"Maximum number of providers to return (1-50, default 10).","type":"integer"}},"type":"object"}}}}}},"/rest/cms/get_spending":{"post":{"tags":["Health"],"summary":"get_spending","description":"Get Medicare spending per beneficiary for a hospital.\n\nReturns average Medicare spending per patient episode for the facility\ncompared to the national average. This metric reflects total payments\nacross the care episode — hospital, post-acute, and other services.\n\nArgs:\n    facility_id: 6-digit CMS facility ID (e.g. \"050324\").\n\nReturns:\n    Spending per beneficiary, national average, and measurement period.","operationId":"cms_get_spending","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"facility_id":{"description":"6-digit CMS facility ID for the hospital (e.g. \"050324\"). Use search_hospitals to find IDs.","type":"string"}},"required":["facility_id"],"type":"object"}}}}}},"/rest/cms/report_feedback":{"post":{"tags":["Health"],"summary":"report_feedback","description":"Report a bug, feature request, or general feedback for this data source.\n\nUse this when something doesn't work as expected, when you'd like\na new feature, or when you have suggestions for improvement.\n\nArgs:\n    feedback: Describe the issue or suggestion.\n    feedback_type: One of 'bug', 'feature_request', or 'general'.","operationId":"cms_report_feedback","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"feedback":{"type":"string"},"feedback_type":{"default":"general","type":"string"}},"required":["feedback"],"type":"object"}}}}}}},"tags":[{"name":"Health","description":"Data sources: Health"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"gnist-api-key","description":"API key passed via request header."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"gnist_api_key","description":"API key passed via query parameter."}}}}