Skip to main content
Glama

get_data

Retrieve ISTAT statistical data: small queries return inline text, large datasets are saved to a local file. Use key filters or last_n_observations to avoid timeouts on long time series.

Instructions

Fetch statistical data from ISTAT. Returns formatted text inline for small queries and automatically downloads to a local disk file for large datasets, for payloads above 1 MB, or when force_file_download=True. The key_filter is a dotted SDMX key string (e.g. 'A.053011.W_SUPPL+W_TOTLOS'), not a dictionary. On dataflows with long time series (e.g. 22_389) pass last_n_observations=1, otherwise ISTAT scans the whole series and the request times out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoFormato richiesto a ISTAT (default 'tsv'). Attenzione: l'endpoint SDMX di ISTAT serve SDMX-CSV anche quando si chiede TSV. Il campo 'format' della risposta riporta il formato effettivamente ricevuto, 'requested_format' quello richiesto.tsv
end_periodNoPeriodo finale SDMX, es. '2022' o '2022-12'.
key_filterNoChiave SDMX in forma di stringa puntata, NON un dizionario. Un segmento per dimensione, nell'ordine di posizione restituito da get_constraints; segmento vuoto = tutti i valori; piu' valori sullo stesso segmento si separano con '+'. Esempio 609_1_DF_DCCV_URBANENV_1 (FREQ.REF_AREA.DATA_TYPE.TIME_PERIOD...): 'A.053011.W_SUPPL+W_TOTLOS' oppure '..W_SUPPL+W_TOTLOS' per tutti i comuni. Omesso, '.', 'all' o '*' = nessun filtro (l'intero dataflow). (Nelle versioni precedenti del server si chiamava 'dimension_filters'.)
dataflow_idYesID del dataflow ISTAT, es. '609_1_DF_DCCV_URBANENV_1'.
start_periodNoPeriodo iniziale SDMX, es. '2022' o '2022-01'.
max_inline_rowsNoSoglia di righe oltre la quale il risultato viene salvato su file invece che restituito inline (default 500).
force_file_downloadNoSe True salta l'output inline e scrive sempre il dataset su disco in MCP_STORAGE_DIR, restituendo percorso, dimensione e anteprima. Da usare per dataflow grandi (es. 22_389 popolazione residente).
last_n_observationsNoRestituisce solo le ultime N osservazioni di ogni serie. Indispensabile sui dataflow con serie storiche lunghe (es. 22_389): senza vincolo temporale ISTAT scandisce tutta la serie e la richiesta va in timeout, con last_n_observations=1 risponde in pochi secondi.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries the full burden and discloses key behaviors: automatic switch from inline to file download based on payload size or force_file_download, the requirement for key_filter as a dotted SDMX string (not a dictionary), and timeout risks with long time series. This gives the agent a clear behavioral model before invocation.

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 three tight sentences, front-loaded with the core purpose, then the output behavior, then two critical parameter tips. Every sentence earns its place; there is no fluff or repetition.

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 8 parameters and an existing output schema, the description covers the essential operational decision (inline vs file), the key_filter syntax pitfall, and the timeout issue, all in a compact form. The output schema and rich parameter descriptions handle the remaining details, so the description is complete for its role.

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 coverage is 100%, so the baseline is 3. The description adds operational depth beyond the schema: it explains the file-download trigger threshold, elaborates on the key_filter format with a concrete example, and contextualizes last_n_observations as a timeout mitigation for specific dataflows. Some information duplicates the schema, but the added usage context justifies a 4.

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 opens with 'Fetch statistical data from ISTAT', a specific verb and resource, and clearly distinguishes from sibling metadata tools (get_constraints, get_concepts, discover_dataflows) by targeting actual data retrieval. It also includes scope details like inline vs file output, making the purpose unambiguous.

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 clear contextual usage guidance: small queries return inline text, large datasets auto-download to a file, and force_file_download=True forces file output. It also gives an explicit troubleshooting tip (pass last_n_observations=1 for long time series to avoid timeouts). However, it does not explicitly name when-not-to-use alternatives, so it stops short of 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/ManoloZocco/istat-mcp-suite'

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