Skip to main content
Glama

ilostat-mcp-server

Compare areas on an ILOSTAT dataset

ilostat_compare_geographies
Read-onlyIdempotent

Compare reference areas on one ILOSTAT dataset and one slice — a sex code plus breakdown codes, defaulting to the dataset's totals — giving each area's value at a common period or at its latest non-projected period, optional change over N years, and a rank, with each value's period, source, status, and basis (reported, modelled_estimate, or projection). Areas without a value are listed separately with the reason, and the response flags mixed periods and mixed bases rather than hiding them. Select areas by code list, by group (X01 for every country, an ILO region or subregion, or a World Bank income group), or both; X-coded aggregates require a dataset with aggregates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sexNoSex code SEX_T, SEX_M, SEX_F, or SEX_O; T/M/F/O and total/both/male/female/other are accepted. Defaults to SEX_T on a dataset with a sex breakdown; refused on one without.
sortNoRow order: value_desc (default), value_asc, or ref_area. rank is always by value, highest first.value_desc
periodNoA common period, YYYY, YYYYQn, or YYYYMmm matching the dataset frequency (2024-Q2 and 2025-03 are normalized). Omit to compare each area at its latest period.
classif1NoFirst breakdown code, case-insensitive. Defaults to the dataset's total code; required when the breakdown has no total (deciles); refused on a dataset without the breakdown. ilostat_describe_indicator lists the dataset's codes and marks its totals.
classif2NoSecond breakdown code; same defaults and rules as classif1.
ref_areasNoReference areas (up to 300): ISO3 codes (USA) or X-coded aggregates (X01 World); case-insensitive, ILO_GEO_ forms accepted. At least one of ref_areas or area_group is required.
area_groupNoX01 for every country, an ILO region or subregion, or a World Bank income group (X06, X56, X02, …); expands to its member countries. The group's own aggregate is compared only when listed in ref_areas. ilostat_list_reference topic area_groups lists the codes.
dataset_idYesOne dataset ID (UNE_DEAP_SEX_AGE_RT_A), as ilostat_search_indicators returns it; case-insensitive, a DF_ prefix (the SDMX dataflow form) stripped, a bare indicator code resolved when it has one frequency.
change_yearsNoAdds each value's change from the same sub-period this many years earlier, in the dataset unit.
lookback_yearsNoLatest mode: an area's latest value must fall within this many years of the current year.
include_projectionsNoLatest mode: let projections (ILO modelled values after the cutoff) be an area's latest value.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoInline preview budget, in serialized characters.
modeNolatest: each area's latest value; period: every area at one period.
rowsNoAreas with a value, in the requested order; the staged dataframe holds all when larger.
errorNoPresent when the call failed. Absent on success.
shownNoRows returned inline.
sliceNoThe one series compared per area.
legendNoLabels for the status flags and note codes in rows.
noticeNoMixed periods, mixed bases, missing areas, a unit or area list the structure service could not supply, where the full comparison is staged, or why the inline rows stop early.
periodNoPeriod mode: the period compared.
datasetNoOne requested dataset and how its values are classed.
missingNoRequested areas with no value, and why.
dataframeNoThe staged dataframe holding the full result; present only when staged.
truncatedNoTrue when the inline rows stop before the last area — also when a dataframe holds the full comparison.
attributionNoCitation to keep with any use of the data.
window_fromNoLatest mode: the first year requested — lookback_years before the current year, and change_years further back to reach the change base. A latest value still falls within lookback_years.
change_yearsNoYears the change is measured over, when requested.
comparabilityNoWhat makes the values more or less comparable, over every area.
applied_filtersNoEvery parameter sent upstream.
include_projectionsNoWhether a projection could be an area's latest value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, open-world behavior, yet the description goes well beyond them: areas lacking values are listed separately with a reason, mixed periods and mixed bases are flagged rather than hidden, and each value carries period, source, status, and basis (reported/modelled_estimate/projection). That is exactly the kind of output-shape and edge-case disclosure annotations cannot provide.

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?

Content is front-loaded and every clause carries information, but the opening sentence is a long run-on enumerating period, change, rank, and basis in one breath. Given the tool's 11-parameter complexity the length is defensible, though it could be split for scanability.

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?

For an 11-parameter, single-required-param tool with an output schema, the description covers selection modes, defaults, aggregate restrictions, null handling, and mixed-period/base flagging. Nothing an agent needs to invoke it correctly is missing.

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%, so the schema already documents all 11 parameters in detail (defaults, enums, patterns, limits). The description adds framing about the slice concept (sex plus breakdown codes defaulting to totals) but little parameter syntax beyond what the schema carries, so the baseline 3 applies.

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 names a specific verb (compare) and resource (reference areas on one ILOSTAT dataset and one slice), and spells out the scope: values at a common or latest non-projected period, optional change over N years, and a rank. An agent can distinguish this from ilostat_query_indicator (single indicator extraction) or ilostat_get_country_profile without opening the schema.

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?

It clearly establishes the operating context: select areas by code list, by group, or both, and X-coded aggregates require a dataset with aggregates. That is strong contextual guidance, but it never explicitly names a sibling tool as the alternative or states when NOT to use this in favor of ilostat_query_indicator or ilostat_list_reference.

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.