Skip to main content
Glama

Portuguese Official Statistics Indicator Data

ine-portugal.stats.indicator_data
Read-onlyIdempotent

Get observation data for a Statistics Portugal (INE) indicator by its 7-digit varcd code (e.g. "0008273" for resident population by NUTS region, sex and age group). Optionally filter by up to 6 generic dimensions (Dim1 is usually the reference period, the rest are indicator-specific, e.g. geography/sex/age) — get valid codes first from ine-portugal.indicator_metadata. There is no upstream search/catalog endpoint, so the varcd must already be known. Data: www.ine.pt (Statistics Portugal open JSON indicator API), no auth required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dim1NoFilter code for Dimension 1 (usually the reference period, e.g. "S7A2023" for year 2023 or "2023" depending on the indicator). Get valid codes from ine-portugal.indicator_metadata before calling. Omit to fetch data across all periods.
dim2NoFilter code for Dimension 2 (indicator-specific, e.g. a NUTS geography code). Get valid codes from ine-portugal.indicator_metadata. Omit to include all values of this dimension.
dim3NoFilter code for Dimension 3 (indicator-specific, e.g. sex). Get valid codes from ine-portugal.indicator_metadata. Omit to include all values of this dimension.
dim4NoFilter code for Dimension 4 (indicator-specific, e.g. age group). Get valid codes from ine-portugal.indicator_metadata. Omit to include all values of this dimension.
dim5NoFilter code for Dimension 5, if the indicator has one. Get valid codes from ine-portugal.indicator_metadata. Omit to include all values of this dimension.
dim6NoFilter code for Dimension 6, if the indicator has one. Get valid codes from ine-portugal.indicator_metadata. Omit to include all values of this dimension.
langNoResponse language for labels: "EN" (English, default) or "PT" (Portuguese).
varcdYesINE (Statistics Portugal) 7-digit indicator code, zero-padded (e.g. "0008273" for resident population by NUTS/sex/age group). There is no upstream search/catalog endpoint — find valid codes via the official INE indicator database (www.ine.pt/xportal) or ine-portugal.indicator_metadata once you have a code.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare this as read-only, idempotent, open-world, and non-destructive. The description goes further by adding that no auth is required, that data comes from the public INE JSON API, and that the varcd must be pre-known because no search endpoint exists. These are useful behavioral caveats beyond what the annotations state, though not exhaustive about response limits.

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 four sentences and every sentence earns its place: what the tool does, how filters work, the prerequisite metadata lookup, and the source/auth situation. It is front-loaded with the core action and identifier format, with no filler or repetition of schema-only detail.

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 that an output schema is present, return values do not need to be described. The tool covers the required varcd, the optional dimension semantics, the prerequisite code-lookup step, the source endpoint, and authentication status. An agent has everything needed to decide whether and how to call this tool correctly.

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, but the description adds real meaning by explaining the generic nature of dim1-dim6: 'Dim1 is usually the reference period, the rest are indicator-specific'. The example varcd '0008273' and the clarification about zero-padding make parameter usage clearer without contradicting 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 opens with the specific action 'Get observation data for a Statistics Portugal (INE) indicator by its 7-digit varcd code', naming both the resource and the exact identifier format with a concrete example. It clearly separates this tool from its sibling ine-portugal.stats.indicator_metadata, positioning the metadata tool as the source for codes rather than data.

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 usage context: call this only when you already know a varcd because 'there is no upstream search/catalog endpoint'. It also tells the agent to get valid dimension codes first from ine-portugal.indicator_metadata, effectively naming the alternative tool and the prerequisite workflow.

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.