Skip to main content
Glama

Pesquisas do IBGE

ibge_pesquisas
Read-onlyIdempotent

List IBGE surveys and their tables, search by name or code, or view details of a specific survey such as Census, PNAD, or GDP to identify the right data source.

Instructions

Lists available IBGE surveys and their tables.

Features:

  • List all IBGE surveys (Census, PNAD, GDP, etc.)

  • Search by name or code

  • Show details and tables of a specific survey

  • Categorize surveys by theme

Main surveys:

  • Census: Demographic, Agricultural, MUNIC

  • PNAD Contínua: Employment, income, education

  • National Accounts: GDP, investments

  • Economic Surveys: Industry, Commerce, Services

  • Price Indices: IPCA, INPC

Examples:

  • List all: (no parameters)

  • Search population: busca="população"

  • PNAD details: detalhes="pnad"

This lists surveys, not data. To find table codes use ibge_sidra_tabelas; to query data use ibge_sidra (or a wrapper: ibge_censo, ibge_indicadores, ibge_comparar, ibge_cidades).

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buscaNoTermo para buscar no nome ou ID da pesquisa
detalhesNoCódigo da pesquisa para ver detalhes e tabelas disponíveis

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modoYesModo de consulta que originou este resultado: lista de pesquisas ou detalhes de uma
buscaNoTermo de busca aplicado, se houver (modo lista)
totalNoTotal de pesquisas encontradas (modo lista)
pesquisaNoDetalhes de uma pesquisa específica (modo detalhes)
pesquisasNoLista de pesquisas (modo lista)
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)

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: -[
      -  "modo"
      -]New value: +[
      +  "modo",
      +  "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": {
      +    "busca": {
      +      "description": "Termo de busca aplicado, se houver (modo lista)",
      +      "type": "string"
      +    },
      +    "modo": {
      +      "description": "Modo de consulta que originou este resultado: lista de pesquisas ou detalhes de uma",
      +      "enum": [
      +        "lista",
      +        "detalhes"
      +      ],
      +      "type": "string"
      +    },
      +    "pesquisa": {
      +      "additionalProperties": false,
      +      "description": "Detalhes de uma pesquisa específica (modo detalhes)",
      +      "properties": {
      +        "id": {
      +          "description": "Código da pesquisa",
      +          "type": "string"
      +        },
      +        "nome": {
      +          "description": "Nome da pesquisa",
      +          "type": "string"
      +        },
      +        "tabelas": {
      +          "description": "Tabelas disponíveis na pesquisa",
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "id": {
      +                "description": "Código da tabela (agregado)",
      +                "type": "string"
      +              },
      +              "nome": {
      +                "description": "Nome da tabela",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "nome"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "totalTabelas": {
      +          "description": "Quantidade de tabelas da pesquisa",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "nome",
      +        "totalTabelas",
      +        "tabelas"
      +      ],
      +      "type": "object"
      +    },
      +    "pesquisas": {
      +      "description": "Lista de pesquisas (modo lista)",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "description": "Código da pesquisa",
      +            "type": "string"
      +          },
      +          "nome": {
      +            "description": "Nome da pesquisa",
      +            "type": "string"
      +          },
      +          "totalTabelas": {
      +            "description": "Quantidade de tabelas (agregados) da pesquisa",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "nome",
      +          "totalTabelas"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total": {
      +      "description": "Total de pesquisas encontradas (modo lista)",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "modo"
      +  ],
      +  "type": "object"
      +}
  5. First observedv1.0.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the description's restatement of 'read-only and idempotent' earns no credit. It does add that this is a live GET against the public IBGE SIDRA/Pesquisas API, which clarifies the network dependency, but says nothing about rate limits, failures, or empty-result behavior.

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 core purpose and the sibling routing sentence, then structured into Features/Main surveys/Examples/Behavior. The 'Main surveys' catalog is domain-flavored filler that lengthens the definition without changing how the tool is called, keeping this short of a 5.

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?

An output schema exists, so return-value detail is unnecessary. Between purpose, explicit sibling alternatives, parameter examples, and the domain framing of survey families, an agent has everything needed to select and invoke 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 description coverage is 100%, so the baseline is 3. The description goes beyond that by showing the intended shape of each argument in context (busca="população" for name search, detalhes="pnad" for a survey's tables), which clarifies that detalhes takes a survey code rather than an arbitrary string.

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 a specific verb and resource ('Lists available IBGE surveys and their tables') and immediately disambiguates from siblings with 'This lists surveys, not data.' The agent knows exactly what this tool returns versus ibge_sidra and 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?

Explicitly routes to alternatives: ibge_sidra_tabelas for table codes, ibge_sidra or the named wrappers for data. The Examples block maps each parameter mode (none, busca, detalhes) to a concrete intent, so when-to-use is fully specified.

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