Skip to main content
Glama
clarifyhealth

cms-datagov-mcp-server

cms_query_dataset

Query CMS healthcare datasets with filters, sorting, and pagination to return up to 5000 rows. For larger data, use the CSV link to load into Athena.

Instructions

Query a CMS dataset with filters, sorting, and pagination. Returns up to 5000 rows per request. For larger datasets, use csv_link and load into Athena.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoNumber of rows to return (max 5000, default 100)
sortNoColumn name to sort by (prefix with - for descending)
filterNoFilter expression (e.g., '[field]=value' or '[field]=value1,value2')
offsetNoNumber of rows to skip (for pagination)
columnsNoComma-separated list of columns to return
dataset_idYesThe unique identifier (UUID) of the dataset

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.4

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full behavioral burden. It discloses the row limit (5000) and mentions pagination parameters, which is helpful, but omits important traits such as authentication requirements, rate limits, or what happens when filters are invalid. The mention of 'Returns up to 5000 rows' is a useful constraint but insufficient for a query tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core functionality and a key operational limit. Every sentence earns its place by quickly establishing scope and a fallback for larger datasets.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a query tool with six parameters and no output schema, the description covers the essential constraints (row limit, pagination alternative). It is nearly complete, though it could benefit from a brief note on return format or error handling to fully guide the agent in edge cases.

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

Parameters3/5

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

Schema description coverage is 100%, meaning all parameters are fully documented in the schema itself. The description does not add any parameter-specific details beyond what is already present, such as filter syntax or sort direction format. Baseline score of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Query a CMS dataset') and names the supported operations (filters, sorting, pagination). However, it doesn't differentiate from siblings like cms_search_datasets or cms_get_dataset, leaving the agent to infer that this tool retrieves actual row data rather than metadata.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context: it returns up to 5000 rows and suggests using csv_link for larger datasets, which is a useful when-to-use-exclusion. It lacks explicit guidance on when to choose this tool over cms_search_datasets or cms_get_dataset_stats, which would resolve ambiguity.

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