Skip to main content
Glama

Query Eurostat Dataset

eurostat_query_dataset
Read-onlyIdempotent

Fetch statistical data from a Eurostat dataset with dimension filters. Returns a deterministic inline prefix of decoded observations with dimension codes and labels, numeric values, an OBS_FLAG status (e.g., "p" = provisional, "e" = estimated) and a separate CONF_STATUS confidentiality marker (e.g., "C" = confidential, which is usually why a value is null). preview_limit controls only that prefix; filters and period controls reduce the matched result itself. Call eurostat_get_dataset_info first to discover valid dimension codes and values. Apply filters to keep the result set manageable — large unfiltered queries may trigger an async response error. Use filters.geo for specific country/region codes, or geo_level for NUTS hierarchy filtering (mutually exclusive). Use last_n_periods for the N most recent periods without knowing the end date. Matches above 5,000 observations are staged whole when this deployment runs a dataframe canvas: call eurostat_dataframe_describe first, then eurostat_dataframe_query. Matches at or below 5,000 are never staged. When the target is a whole dataset rather than a slice, eurostat_download_dataset reads the SDMX bulk endpoint instead and is the cheaper route.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoLanguage for labels in the response. Default is "EN". Options: "EN", "FR", "DE".EN
filtersNoDimension filters as a map of dimension code → array of valid values. Example: {"unit": ["CP_MEUR"], "na_item": ["B1GQ"], "geo": ["DE", "FR"]}. An empty array is treated as no filter for that dimension and is dropped from the request. Do not include "geo" here if using geo_level. Invalid dimension values silently return no data — verify with eurostat_get_dimension_values first.
canvas_idNoReuse an existing dataframe canvas, so a result staged by this call lands beside earlier ones and can be joined against them. Pass a canvasId from a previous response; omit to start a fresh canvas. Ignored on deployments without a dataframe canvas and when the match is at or below 5,000 observations.
geo_levelNoFilter by NUTS hierarchy level. Mutually exclusive with a "geo" key in filters. Options: "aggregate" (EU/EA totals), "country" (41 member/candidate states), "nuts1" (127 major regions), "nuts2" (309 basic regions), "nuts3" (1,343 small regions).
dataset_codeYesDataset code (e.g., "nama_10_gdp"). Required.
since_periodNoStart of time range (e.g., "2020", "2023-Q1", "2024-01"). Mutually exclusive with last_n_periods.
until_periodNoEnd of time range (e.g., "2024"). Omit for data through the latest available period. Mutually exclusive with last_n_periods.
preview_limitNoHow many matched observations to return inline, from the deterministic start of the JSON-stat cell order. Default 50; maximum 500. This changes only the inline prefix: it does not reduce obsCount, missingObsCount, timeRange, the upstream response, or the rows staged when the match exceeds 5,000. Use filters or period controls to reduce the match itself.
last_n_periodsNoReturn only the N most recent periods. Mutually exclusive with since_period and until_period.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when preview_limit omits matched rows or the match was staged — distinguishes the inline prefix from filters that reduce the match and, when staged, gives the describe-then-query sequence. Omitted when the preview contains the whole match.
canvasIdNoDataframe canvas holding the staged result. Pass to eurostat_dataframe_describe, eurostat_dataframe_query, or a later eurostat_query_dataset call. Omitted when nothing was staged.
obsCountNoTotal number of observations matched (before any cap).
tableNameNoCanvas table holding every matched observation in flat form — one code column per dimension plus a "_label" companion, then obs_value, obs_flag, obs_flag_label, conf_status, conf_status_label. Call eurostat_dataframe_describe with canvasId first to confirm the table and columns, then eurostat_dataframe_query. Omitted when nothing was staged: either the match was at or below 5,000 observations, or this deployment runs without a dataframe canvas.
timeRangeNoTime coverage of everything matched — the same set obsCount counts, so it can reach periods absent from observations when truncated is true. Each bound is omitted when neither the match nor Eurostat report it — an omitted bound is unknown, not empty.
truncatedNoTrue only when the match exceeded the 5,000-observation staging threshold. Independent of preview_limit: observations can be a shorter prefix while truncated is false. When tableName is set, call eurostat_dataframe_describe first and then eurostat_dataframe_query; when it is absent, use filters or period controls to reduce the match.
datasetCodeNoDataset code as provided.
datasetLabelNoHuman-readable dataset title.
observationsNoThe first preview_limit decoded observations in deterministic JSON-stat cell order — the leading combinations of the dataset dimensions, neither a sample nor necessarily the most recent periods. This prefix is independent of the 5,000-observation staging threshold. When tableName is set, the table holds every matched row; otherwise use filters or a period range to reduce the match itself.
appliedFiltersNoEffective query parameters applied to the Eurostat API.
dimensionsUsedNoOrdered list of dimension codes present in the response (e.g., ["freq", "unit", "na_item", "geo", "time"]).
stagedRowCountNoRows written to the canvas table. Matches obsCount. Omitted alongside tableName when nothing was staged.
missingObsCountNoNumber of matched observations carrying no numeric value, counted across everything matched rather than only the returned rows. Covers both unavailable and withheld cells — a slice can be wholly confidential, so this equalling obsCount does not mean the data is absent.

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, so the bar is lower, yet the description adds substantial behavior: deterministic inline prefix with OBS_FLAG and CONF_STATUS semantics, preview_limit affecting only the prefix, the 5,000 staging threshold, and the potential async response error for large unfiltered queries. All disclosed behavior is consistent with the read-only and idempotent 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?

Though long, the description is front-loaded with purpose and return format, and every sentence carries distinct information: return structure, preview semantics, prerequisites, filter guidance, error risk, staging threshold, and sibling routing. There is no repetition or filler relative to the complexity of the tool.

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?

The description covers prerequisites, parameter semantics, error conditions, staging behavior, and alternative routing. The output schema exists, so return values need not be spelled out further, and nothing needed to invoke the tool correctly is missing.

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 100%, so the baseline is 3, and the description adds meaning by clarifying that preview_limit only controls the inline prefix while filters and period controls reduce the matched result, that geo_level is mutually exclusive with a 'geo' filter key, and that last_n_periods handles unknown end dates. This goes beyond what the schema states.

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 states a specific action ('Fetch statistical data from a Eurostat dataset with dimension filters') and immediately distinguishes it from eurostat_download_dataset, which reads the SDMX bulk endpoint for whole datasets. This allows an agent to tell it apart from siblings without inspecting schemas.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: call eurostat_get_dataset_info first for valid dimensions, use filters.geo vs geo_level, use last_n_periods when the end date is unknown, and route to eurostat_download_dataset for whole datasets. It also names the exact alternatives (eurostat_dataframe_describe, eurostat_dataframe_query) for matches above 5,000 observations.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a clearly distinct role: discovery, metadata lookup, dimension value lookup, inline query, bulk download, dataframe staging, and dataframe SQL. The two data-fetching tools are explicitly differentiated as slice vs. whole-dataset routes, and the dataframe tools are clearly separate from direct Eurostat queries.

Naming Consistency4/5

Six of eight tools follow a consistent eurostat_verb_noun pattern, e.g., search_datasets, get_dataset_info, query_dataset. The two dataframe tools invert this to eurostat_dataframe_describe and eurostat_dataframe_query, which is a minor deviation but still readable and predictable.

Tool Count5/5

Eight tools is a well-scoped count for the Eurostat data-access domain. Each tool covers a distinct stage in the workflow from discovery, metadata inspection, targeted querying, bulk download, and post-query analysis.

Completeness5/5

The toolset covers the full expected lifecycle: browse and search to find datasets, get metadata and dimension values to construct queries, query or download data, and stage/query results for further analysis. No significant dead ends or missing operations are evident for the stated purpose.