Skip to main content
Glama

undata_query

Query any UN statistical dataflow using SDMX dimension keys to retrieve raw parsed data rows. Specify a flow reference, dimension key, and optional year range to pull targeted datasets from UNdata.

Instructions

Generic SDMX query for any UNdata dataflow. Use when the specific WDI or MDG tools don't cover your dataflow. The key is an SDMX dimension key: dimensions separated by dots, blank means 'all values'. Examples: WDI all Peru annual: flow_ref='DF_UNDATA_WDI', key='A..PER'. MDG all Peru: flow_ref='DF_UNDATA_MDG', key='......PER..'. WDI all countries one year: flow_ref='DF_UNDATA_WDI', key='A..', start_year='2022', end_year='2022'. Returns raw parsed rows (limit to avoid huge responses).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
limitNo
end_yearNo
flow_refYes
start_yearNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that it 'Returns raw parsed rows' and warns to 'limit to avoid huge responses,' which is useful. However, it doesn't disclose the query's performance characteristics, potential rate limits, failure modes, or how errors surface. The limit/disclosure is helpful but incomplete for a generic tool covering arbitrary dataflows.

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

Conciseness4/5

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

The description is reasonably compact given the complexity of explaining SDMX dimension keys. The examples are front-loaded and directly instructive. It packs a lot of signal into a moderate length. Could be slightly tighter, but the examples are valuable and earn their space.

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

Completeness3/5

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

For a generic tool with no output schema and no annotations, the description does a good job explaining core mechanics. However, it doesn't cover error handling, whether invalid dimension keys fail fast, the meaning of the returned 'raw parsed rows' structure, or how to explore available dataflows (though undata_list_dataflows exists as a sibling). The examples cover common use patterns well but leave edge cases undocumented.

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?

Schema description coverage is 0%, so the description must compensate. It does so well: it explains the key parameter format in detail ('dimensions separated by dots, blank means all values'), shows flow_ref usage with example values, and demonstrates start_year/end_year usage. It explains the key parameter thoroughly but doesn't separately elaborate on limit beyond mentioning responses can get huge. Still, strong compensation for the 0% coverage.

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?

The description clearly states it's a 'Generic SDMX query for any UNdata dataflow' with a specific verb+resource. It provides concrete usage examples and explains the dimension key format. It distinguishes itself from siblings by explicitly saying to use it 'when the specific WDI or MDG tools don't cover your dataflow,' which differentiates it from undata_get_wdi_data and undata_get_mdg_data.

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 gives explicit guidance on when to use this tool ('Use when the specific WDI or MDG tools don't cover your dataflow') and provides three concrete examples with flow_ref/key pairs covering different scenarios. It doesn't name alternative sibling tools explicitly but points to the category of WDI/MDG specific tools. Could be improved by naming alternatives directly, hence not a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JOSETRA44/UNdata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server