Skip to main content
Glama

Query US Public Data

datausa.data.query
Read-onlyIdempotent

Query US government statistical data (Census/ACS, BLS, IPEDS, and more) from Data USA. Group by one or more dimensions (e.g. State, Year, Industry) and retrieve one or more measures (e.g. Population, Median Household Income), optionally restricted to specific member keys. Returns dataset source/citation plus the resulting rows (Data USA, Deloitte/Datawheel/MIT Media Lab, US government open data)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cubeYesData cube (dataset) name to query, e.g. "acs_yg_total_population_1". Look up names via datausa.reference.cubes.
sortNoSort order as "field" or "field.order" where order is asc/desc, e.g. "Population.desc".
limitNoMaximum number of result rows to return (default 100, max 1000).
offsetNoNumber of result rows to skip, for pagination (default 0).
includeNoRestrict results to specific member keys, formatted "Level:key,key;Level2:key" (e.g. "State:04000US06" for California only, or "Year:2021,2022"). Find member keys via datausa.reference.members.
measuresYesMeasure (metric) names to retrieve, e.g. ["Population"]. Look up available measures for a cube via datausa.reference.cubes.
drilldownsYesDimension level names to group the results by, e.g. ["State"] or ["State", "Year"]. Look up available levels for a cube via datausa.reference.cubes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true, and destructiveHint=false, so the agent knows this is a safe, non-mutating, idempotent read operation. The description adds value by disclosing the return content (dataset source/citation plus rows) and the open-data nature. However, it does not elaborate on any potential side effects (there are none) or further behavioral nuances. Given the annotations cover the core safety profile, a score of 3 reflects that the description provides some additional context but not extensive.

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 primary action, and includes just enough detail (examples, return format) without redundancy. Every sentence earns its place; no fluff or irrelevant information. The structure is tight and easy to parse.

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 tool's complexity (7 parameters, 3 required), the presence of an output schema (which explains return values), and annotations covering safety, the description is fairly complete. It explains the core query pattern (grouping, measures, filtering), mentions the return content, and references the data sources. It does not explicitly state how to discover cube names or member keys, but the schema parameters point to datausa.reference.cubes and datausa.reference.members, and the agent can infer this from sibling tools. The description is sufficient for an agent to understand the tool's role and basic usage without being exhaustive.

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

Parameters4/5

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

The schema covers 100% of parameters with descriptions, so the baseline is 3. The description enhances this by providing concrete examples for drilldowns (State, Year, Industry) and measures (Population, Median Household Income), and by explaining the concept of grouping and optional restriction to member keys (mapping to the 'include' parameter). This goes beyond the schema's per-parameter descriptions by tying them into a coherent usage pattern, which helps the agent construct queries correctly.

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

Purpose5/5

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

The description clearly states the tool's purpose: query US government statistical data from Data USA, with grouping by dimensions and retrieval of measures, optionally filtered by member keys. It distinguishes itself from sibling tools like datausa.reference.cubes (lookup) and other query tools by specifying the exact resource (Data USA) and the operational pattern (group and measure). The verb 'Query' plus resource is specific and unambiguous.

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

Usage Guidelines2/5

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

The description does not explicitly state when to use this tool versus alternatives or when not to use it. While the tool name and context imply it is the primary query tool for Data USA, and the schema mentions using datausa.reference.cubes for cube lookup, the description itself provides no guidance on selecting this over other statistical query tools (e.g., census.data.demographics, socrata.datasets.query) or when to prefer the reference tools. No exclusions or alternative routing is mentioned.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.