Skip to main content
Glama

Metadados de tabela SIDRA

ibge_sidra_metadados
Read-onlyIdempotent

Retrieve metadata for a SIDRA table to learn its variables, territorial levels, and periods before querying data. Inspect table structure to build correct data requests.

Instructions

Returns metadata for a specific SIDRA table.

Features:

  • General info (name, survey, subject, periodicity)

  • Available territorial levels

  • Variable list with units

  • Classifications and categories

  • Available periods

Use this tool to understand table structure BEFORE querying data with ibge_sidra.

Examples:

  • Population table metadata: tabela="6579"

  • Census 2022 metadata: tabela="9514"

  • PNAD unemployment: tabela="4714"

Use this after finding a table code (ibge_sidra_tabelas) and before querying with ibge_sidra.

Behavior: read-only and idempotent — a live GET against the public IBGE SIDRA API. Returns Markdown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabelaYesCódigo da tabela/agregado SIDRA (ex: '6579', '9514', '4714')
incluir_periodosNoIncluir lista de períodos disponíveis (padrão: true)
incluir_localidadesNoIncluir níveis territoriais disponíveis (padrão: false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL da tabela no SIDRA
nomeYesNome da tabela
codigoYesCódigo da tabela/agregado SIDRA
assuntoNoAssunto/tema da tabela
periodosNoPeríodos disponíveis para a tabela (quando incluir_periodos)
pesquisaNoNome da pesquisa de origem
variaveisNoVariáveis da tabela, com unidades e classificações/categorias
provenanceYesBloco de proveniência (contrato v1.0): fonte, URL, período, extração e licença
attributionYesURLs canônicas das fontes desta resposta (lista de atribuição)
periodicidadeNoPeriodicidade da pesquisa
niveisTerritoriaisNoNíveis territoriais disponíveis para a tabela

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv5.0.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed4 schema fields changedv4.0.0
    • removedOutput schema / properties / provenance / properties / data_vintage / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / provenance / properties / data_vintage / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / provenance / properties / license / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / provenance / properties / license / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed6 schema fields changedv3.3.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / attribution
      Added value: +{
      +  "description": "URLs canônicas das fontes desta resposta (lista de atribuição)",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Bloco de proveniência (contrato v1.0): fonte, URL, período, extração e licença",
      +  "properties": {
      +    "citation": {
      +      "description": "Citação pronta para uso",
      +      "type": "string"
      +    },
      +    "data_vintage": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Período de referência do dado segundo a fonte; null se a fonte não expõe"
      +    },
      +    "license": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Regime legal do dado"
      +    },
      +    "retrieved_at": {
      +      "description": "Instante real da extração no upstream (ISO-8601, horário de Brasília)",
      +      "type": "string"
      +    },
      +    "source": {
      +      "description": "Fonte oficial do dado (API do IBGE consultada)",
      +      "type": "string"
      +    },
      +    "source_url": {
      +      "description": "URL canônica que reproduz a consulta",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "source",
      +    "source_url",
      +    "data_vintage",
      +    "retrieved_at",
      +    "citation",
      +    "license"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "codigo",
      -  "nome"
      -]New value: +[
      +  "codigo",
      +  "nome",
      +  "provenance",
      +  "attribution"
      +]
  4. Changed1 schema field changedv3.0.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "assunto": {
      +      "description": "Assunto/tema da tabela",
      +      "type": "string"
      +    },
      +    "codigo": {
      +      "description": "Código da tabela/agregado SIDRA",
      +      "type": "string"
      +    },
      +    "niveisTerritoriais": {
      +      "description": "Níveis territoriais disponíveis para a tabela",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "codigo": {
      +            "description": "Código do nível territorial (ex: N1, N3, N6)",
      +            "type": "string"
      +          },
      +          "nome": {
      +            "description": "Nome do nível territorial (ex: Brasil, UF, Município)",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "codigo",
      +          "nome"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "nome": {
      +      "description": "Nome da tabela",
      +      "type": "string"
      +    },
      +    "periodicidade": {
      +      "additionalProperties": false,
      +      "description": "Periodicidade da pesquisa",
      +      "properties": {
      +        "fim": {
      +          "description": "Ano/período final da série",
      +          "type": "number"
      +        },
      +        "frequencia": {
      +          "description": "Frequência de coleta (ex: anual, mensal)",
      +          "type": "string"
      +        },
      +        "inicio": {
      +          "description": "Ano/período inicial da série",
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "periodos": {
      +      "description": "Períodos disponíveis para a tabela (quando incluir_periodos)",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "description": "Código do período",
      +            "type": "string"
      +          },
      +          "literais": {
      +            "description": "Descrições textuais do período",
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "literais"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "pesquisa": {
      +      "description": "Nome da pesquisa de origem",
      +      "type": "string"
      +    },
      +    "url": {
      +      "description": "URL da tabela no SIDRA",
      +      "type": "string"
      +    },
      +    "variaveis": {
      +      "description": "Variáveis da tabela, com unidades e classificações/categorias",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "classificacoes": {
      +            "description": "Classificações aplicáveis à variável",
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "categorias": {
      +                  "description": "Categorias da classificação",
      +                  "items": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "id": {
      +                        "description": "ID da categoria",
      +                        "type": "number"
      +                      },
      +                      "nivel": {
      +                        "description": "Nível hierárquico da categoria",
      +                        "type": "number"
      +                      },
      +                      "nome": {
      +                        "description": "Nome da categoria",
      +                        "type": "string"
      +                      },
      +                      "unidade": {
      +                        "description": "Unidade da categoria",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "id",
      +                      "nome"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": "array"
      +                },
      +                "id": {
      +                  "description": "ID da classificação",
      +                  "type": "number"
      +                },
      +                "nome": {
      +                  "description": "Nome da classificação",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "id",
      +                "nome",
      +                "categorias"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "id": {
      +            "description": "ID da variável",
      +            "type": "number"
      +          },
      +          "nome": {
      +            "description": "Nome da variável",
      +            "type": "string"
      +          },
      +          "unidade": {
      +            "description": "Unidade de medida da variável",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "nome"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "codigo",
      +    "nome"
      +  ],
      +  "type": "object"
      +}
  5. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, destructiveHint=false, but the description goes further by explaining the mechanism: 'a live GET against the public IBGE SIDRA API' and specifying the return format is Markdown. This adds context beyond the structured hints about how and where the call executes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose, followed by a scannable bullet list of returned fields, usage guidance, and concrete examples. The examples with real table codes are useful, though the list of features is somewhat verbose since the output schema likely covers some of it.

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 an output schema exists, the description doesn't need to explain return values in detail, yet it still provides helpful categories and example table codes. Combined with explicit routing to sibling tools and API behavior, an agent has everything needed to invoke and interpret this tool correctly.

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

Parameters3/5

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

Schema coverage is 100%, so the schema already documents all three parameters including defaults. The description lists metadata categories that map to the optional flags (periods, territorial levels) but does not add syntax or format details beyond the schema's own descriptions. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

States the specific verb and resource ('Returns metadata for a specific SIDRA table') and enumerates the metadata fields returned. It clearly distinguishes itself from the sibling data-query tool ibge_sidra and the table-search tool ibge_sidra_tabelas.

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?

Explicit routing: 'Use this after finding a table code (ibge_sidra_tabelas) and before querying with ibge_sidra.' Both prerequisite and follow-up tools are named, and the 'BEFORE querying data' condition is unambiguous.

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