Skip to main content
Glama
jpazvd

unicefstats-mcp

by jpazvd

Fetch UNICEF Indicator Data

get_data
Read-onlyIdempotent

Retrieve UNICEF child development data by indicator and country. Accepts codes or names, filters by sex, age, wealth, residence, and year range.

Instructions

Fetch UNICEF data for an indicator and one or more countries.

Returns annual observations from the UNICEF SDMX API. Use format="compact" (default) for a clean 5-column table; use format="full" for all columns including disaggregation details and confidence bounds.

indicator accepts BOTH codes AND human-readable names (v0.7.0). Pass whichever you have from the user's question — the server resolves names to canonical codes for you. Examples: indicator='CME_MRM0' → code passthrough indicator='neonatal mortality' → resolves to 'CME_MRM0' indicator='Under-five mortality rate' → resolves to 'CME_MRY0T4' indicator='U5MR' → resolves to 'CME_MRY0T4' indicator='stunting' → resolves to 'NT_ANT_HAZ_NE2' indicator='LBW' / 'low birth weight' → resolves to 'NT_BW_LBW' Acronyms accepted: NMR, IMR, U5MR, SBR, LBW, ANC1, SAB, BCG, DTP1/3 …

Genuinely ambiguous queries are refused with a disambiguation list. Examples: indicator='child mortality' → refused: pick CME_MRM0 / CME_MRY0 / CME_MRY0T4 / CME_MRY1T4 indicator='vaccination' → refused: pick IM_BCG / IM_DTP1/3 / IM_MCV1/2

Prefer passing the user's phrasing verbatim over guessing the code from memory — that's where the v0.6.x had a documented failure mode (model recalls CME_MRY0T4 thinking it's neonatal mortality; it's under-five). The response echoes the resolution under indicator_resolution so you can confirm the canonical code+name match the user's intent.

countries accepts BOTH ISO3 codes AND country names (v0.6.2). Pass whichever you have from the user's question — the server resolves country names to canonical ISO3 codes for you. Examples: countries=['Burundi'] → resolves to ['BDI'] countries=['BDI', 'Belgium'] → resolves to ['BDI', 'BEL'] countries=['Cote d'Ivoire'] → resolves to ['CIV'] countries=['USA', 'UK'] → resolves to ['USA', 'GBR'] Common synonyms accepted: 'USA'/'United States', 'UK'/'Great Britain', 'Ivory Coast'/'Cote d'Ivoire', 'South Korea', 'DRC', 'Czech Republic', 'Burma', 'Vatican', etc. The response echoes the resolution under country_resolutions and the canonical name+code pairs under countries_returned_with_names so you can confirm intent matched.

Prefer passing the user's country name verbatim over guessing the ISO3 code from memory — that's where v0.6.0 had a documented failure mode.

v0.6.0 server-side hardening: this tool also performs a pre-flight year-frontier check. If start_year or end_year exceeds the indicator's data frontier (max year observed), the call is refused server-side without issuing the SDMX request — preventing the silent-truncation pattern where a range like 2020-2027 returns 2020-2024 and the model extrapolates the missing years. Successful responses include a data_frontier field naming the max year and an explicit no-extrapolation directive.

Disaggregation filters (v1.2.0): sex: "_T" (total, default), "M" (male), "F" (female). age: SDMX AGE code such as "Y0T4", "Y15T19", "Y15T24". The age codelist depends on the indicator's dataflow — call get_indicator_info(code) to see what's supported. filters: dict[str, str | None] for every other dimension. Examples: filters={"WEALTH_QUINTILE": "Q1"} → poorest quintile filters={"RESIDENCE": "U"} → urban filters={"EDUCATION_LEVEL": "ISCED11_2"} → secondary filters={"WEALTH_QUINTILE": "Q1", "RESIDENCE": "U"} → both A None value is treated as "use the dim's total" (typically "_T").

When any non-_T filter is present (typed age= or filters dict non-empty), the response carries mode: "raw_filtered" to signal that the underlying call switched to raw=True + post-filter — same call, different number versus a totals-only response.

Validation: filters are checked against the indicator's actual primary dataflow before the SDMX call. Unsupported (dim, value) pairs are refused with a failed_validation envelope listing available dimensions and codelist values, so the LLM can recover in a single wave instead of retrying blindly.

BREAKING CHANGE FROM v1.1.x: the typed wealth_quintile= and residence= kwargs no longer route to the SDMX call — they are present in the signature only as deprecation trip-wires. Pass them and the call returns a structured migration error pointing at filters={"WEALTH_QUINTILE": ...}. v1.1.x silently dropped these kwargs at the SDMX call and returned the totals slice — that hazard is gone.

Limit defaults to 200 rows — narrow your country/year filters or increase limit (max 500) if you need more data. In raw_filtered mode, rows_truncated: true also means the pre-filter raw pull was larger than limit, so post-filter rows you wanted may be missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ageNoSDMX age slice (e.g. 'Y15T19' for 15-19 years). Routed through raw=True + post-filter — engages mode='raw_filtered'.
sexNoSDMX sex code: '_T' (total, default), 'F' (female), 'M' (male). First-class via the unicefData() call._T
limitNoMaximum row count. Carries `truncated: true` in envelope if hit.
formatNo'compact' = 5-column table (default); 'full' = all SDMX columns including disaggregation details and confidence bounds.compact
filtersNoFree-form filter dict for any dim not first-class via unicefData() — WEALTH_QUINTILE, RESIDENCE, EDUCATION_LEVEL, DISABILITY_STATUS, etc. Engages mode='raw_filtered'. Use get_indicator_info to discover valid dims and codelists per indicator.
end_yearNoInclusive end year (e.g. 2023). Refused if > frontier.
countriesYesList of ISO3 country codes (e.g. ['BRA', 'IND', 'NGA']) OR country names (e.g. ['Brazil', 'India']). Names are resolved server-side. Hard cap of 30 entries per request.
indicatorYesUNICEF SDMX indicator code (e.g. 'CME_MRY0T4') OR human-readable name (e.g. 'under-5 mortality'). Names are resolved server-side.
residenceNoREMOVED in v1.2.0. Use filters={'RESIDENCE': 'U'}.
start_yearNoInclusive start year (e.g. 2010). Refused if > frontier.
wealth_quintileNoREMOVED in v1.2.0. Use filters={'WEALTH_QUINTILE': 'Q1'}.
cascade_on_emptyNoOpt into upstream `unicefdata`'s multi-dataflow cascade. When True AND the indicator has ≥2 dataflows in metadata AND a year or country filter is set, an empty primary-dataflow response causes upstream to walk fallback dataflows (typically GLOBAL_DATAFLOW) for the same code. COST: +1 to +N SDMX round-trips on the unhappy path. BENEFIT: recovers data on multi-dataflow indicators where the topic-specific dataflow doesn't carry the requested country/year. CAVEAT: the walked dataflow may use different methodology / aggregation than the primary (e.g. GLOBAL_DATAFLOW values can be modelled estimates where the primary is observed survey data); inspect `dataflow_used` in the response to confirm.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint. The description adds significant detail: resolution of codes/names, ambiguous query refusal, year-frontier check, raw_filtered mode, validation, deprecation migration, and cascade behavior. No contradictions with 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 well-structured with headings and bullet points, front-loaded with the core purpose. Each section earns its place by conveying necessary details efficiently, despite its length.

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

Completeness5/5

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

Given the tool's complexity (12 parameters, 2 required, 100% schema coverage, output schema exists), the description is exhaustive: it covers all parameters, error cases, deprecations, best practices, and breaking changes. The output schema exists, so return values are not needed here.

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

Parameters5/5

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

Schema coverage is 100%, providing a baseline of 3. The description dramatically enhances parameter understanding with real examples, resolution logic, disambiguation lists, filter usage patterns, and deprecation notes, adding substantial value beyond the schema.

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 'Fetch UNICEF data for an indicator and one or more countries' with a specific verb and resource. It distinguishes itself from siblings like get_indicator_info and search_indicators by focusing on data retrieval rather than metadata or search.

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 extensive usage guidelines including how to pass parameters verbatim, handle disambiguation, use filters, and avoid deprecated features. However, it does not explicitly contrast with sibling tools or state when not to use this tool.

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/jpazvd/unicefstats-mcp'

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