Skip to main content
Glama

sidra_consulta

Read-onlyIdempotent

Query any SIDRA (IBGE) table to retrieve official Brazilian statistics by variable, period, classification and territory; check table metadata first to confirm valid codes.

Instructions

Consulta livre a qualquer tabela do SIDRA (IBGE). Antes, use sidra_metadados para ver variáveis e categorias.

Args: tabela: número da tabela (ex.: 7060 IPCA, 5938 PIB). variaveis: ids separados por vírgula, ou "all". periodos: "last N", "all", "202001-202612" ou "202601,202602". Mensal AAAAMM; trimestral AAAA01 a AAAA04; anual AAAA. classificacoes: ex.: {"315": "7169,7170"}; "all" traz todas. Sem informar, vem o total. nivel_territorial: n1 Brasil, n2 grande região, n3 UF, n6 município, n7 região metropolitana. localidades: "all" ou códigos IBGE separados por vírgula ("35" = SP no n3). limite: linhas devolvidas.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tabela": "<tabela>"
    },
    "name": "sidra_consulta"
  }
}

Input Schema

NameRequiredDescriptionDefault
limiteNo
tabelaYes
periodosNolast 12
variaveisNoall
localidadesNoall
classificacoesNo
nivel_territorialNon1

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so the safety profile is covered. The description adds useful defaults behavior ("Sem informar, vem o total" for classificacoes) and documents the limite row count, but it says nothing about response shape, truncation when limite is hit, or error behavior for invalid table/period combinations.

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?

Purpose and prerequisite are front-loaded in one sentence, then all seven parameters are laid out in a compact Args list with no filler. Every line adds format detail the schema lacks.

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

Completeness4/5

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

For a seven-parameter tool with no output schema and no schema descriptions, the definition covers every parameter with syntax and examples plus the discovery workflow. Remaining gaps are the shape of returned data and what happens when limite truncates results, which matter for an open-ended query tool.

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 0%, so the description carries the full burden, and it largely delivers: it explains the period formats per table frequency (AAAAMM, AAAA01–AAAA04, AAAA), the territorial level code mapping (n1–n7), IBGE locality codes with an example, and the classification dict syntax. Only "limite: linhas devolvidas" is thin and no parameter explains interaction effects.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Consulta livre a qualquer tabela do SIDRA (IBGE)" names a concrete verb and resource with an explicit scope (any table, free-form query). It distinguishes itself from sidra_metadados by declaring that tool a prerequisite, but it does not differentiate itself from other retrieval siblings such as obter_serie or comparar_series.

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 gives a clear prerequisite workflow: run sidra_metadados first to discover variables and categories, then query. This is genuine when-to-use guidance, though it states no exclusions or conditions under which a different sibling (e.g., a pre-built series tool) would be preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.