Skip to main content
Glama
ab-orbit

ab-ibge-mcp-server

by ab-orbit

Consultar Dados de Tabela do SIDRA

ibge_sidra_consultar_tabela
Read-onlyIdempotent

Retrieve data from a specific SIDRA table by location, with optional filters for variables, period, and classifications. Access historical series and current statistics from IBGE for Brazil, states, or municipalities.

Instructions

Consulta dados de uma tabela específica do SIDRA com séries históricas por localidade.

FLUXO RECOMENDADO para tabelas desconhecidas:

  1. ibge_sidra_metadados_tabela → descobre variáveis, classificações e períodos válidos

  2. ibge_periodos_tabela → confirma quais períodos existem (evita HTTP 500)

  3. ibge_sidra_consultar_tabela → consulta com parâmetros corretos

Args:

  • tabela_id: código da tabela

  • variaveis (opcional): ID(s) da(s) variável(is) separados por pipe "|" (ex: "93|94|95"). Sem valor = todas.

  • localidade: "BR", "ESTADOS", "REGIOES", 2 dígitos=estado (ex:"35"), 7 dígitos=município

  • periodo: "last"=mais recente, "-6"=últimos 6, "-12"=últimos 12, "AAAA"=ano específico Use ibge_periodos_tabela para ver períodos válidos e evitar HTTP 500.

  • classificacao (opcional): cópie o valor pronto de ibge_sidra_metadados_tabela. Formato: "ID[cats]|ID[cats]" — use "ID[all]" para todas as categorias de uma classificação. NUNCA invente IDs de categoria — sempre consulte metadados primeiro.

Tabelas populares: 9514=Censo2022 pop, 9543=Censo2022 alfabetização, 5938=PIB Municipal, 1419=IPCA, 6381=PNAD Desocupação

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodoNolast, last[N], AAAA, AAAAMMlast
tabela_idYesCódigo da tabela SIDRA
variaveisNoCódigo(s) da(s) variável(is) separados por pipe '|' (ex: '93|94|95')
localidadeNoBR, ESTADOS, REGIOES, código de estado (2 dígitos) ou município (7 dígitos)BR
classificacaoNoFiltro de classificação no formato 'ID[cats]'
Behavior5/5

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

Annotations declare readOnly, idempotent, and openWorld. The description adds valuable behavioral context beyond these: it discloses potential HTTP 500 errors when fetching invalid periods, emphasizes the need to consult metadata first, and explains the behavior when parameters are omitted (e.g., 'Sem valor = todas'). This prepares the agent for failure modes and correct 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 moderately long but exceptionally well-structured with headers, a numbered workflow, and bullet-like parameter explanations. Every line adds value—examples, error warnings, and handy table IDs—without unnecessary fluff. It is front-loaded with the purpose and recommended flow, making it easy to scan.

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 the tool's complexity (5 flexible parameters, no output schema) and the presence of sibling tools handling metadata and periods, the description provides comprehensive context: prerequisites, parameter syntax, workflow, and common-use table IDs. It covers everything an agent needs to select and invoke this tool correctly, including how to avoid errors.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description enriches parameter understanding with concrete examples and formats: pipe-separated variables, localidade code patterns, special period values ('-6', '-12'), and classification syntax ('ID[all]'). It also explains default behaviors and common pitfalls, going well beyond the schema's basic descriptions.

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 clearly states the tool's purpose: 'Consulta dados de uma tabela específica do SIDRA com séries históricas por localidade.' It uses a specific verb ('Consulta'), names the resource (tabela do SIDRA), and specifies the scope (séries históricas por localidade), making it distinct from sibling tools like metadata or period explorers.

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 provides a detailed recommended workflow for unknown tables, explicitly naming sibling tools (ibge_sidra_metadados_tabela, ibge_periodos_tabela) and explaining when to use each. It also gives warnings to avoid HTTP 500 and advises never to invent classification IDs, giving clear when-to-use and how-to-use guidance.

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/ab-orbit/ab-ibge-mcp-server'

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