Skip to main content
Glama

Censo Demográfico

ibge_censo
Read-onlyIdempotent

Access Brazilian Demographic Census data (1970-2022) by year, theme, and territory — population, literacy, housing, income — without needing SIDRA table codes.

Instructions

Queries IBGE Demographic Census data (1970-2022).

Simplified tool to access census data without knowing SIDRA table codes.

Available years: 1970, 1980, 1991, 2000, 2010, 2022

Available themes:

  • populacao: Resident population

  • alfabetizacao: Literacy rate

  • domicilios: Housing characteristics

  • idade_sexo: Age pyramid

  • religiao: Religion distribution

  • cor_raca: Race/color

  • rendimento: Monthly income

  • educacao: Education level

  • trabalho: Employment

Examples:

  • Population 2022: ano="2022", tema="populacao"

  • Historical series: ano="todos", tema="populacao"

  • Literacy 2010 by state: ano="2010", tema="alfabetizacao", nivel_territorial="3"

  • List tables: tema="listar"

Statistics mode: for largest/smallest/mean/median/distribution/ranking questions over census data ("which municipality had the largest 2022 population?") use estatisticas=true — full distribution + top/bottom computed over ALL rows before truncation; agruparPor="" ranks groups by descending sum. In this mode campos/formato are ignored and registros comes empty.

Use a different tool when:

  • One municipality's current panel (estimate, HDI, GDP) → ibge_cidades

  • Comparing/ranking localities → ibge_comparar

  • An arbitrary SIDRA table → ibge_sidra

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
anoNoAno do censo (1970, 1980, 1991, 2000, 2010, 2022) ou 'todos' para série histórica
temaNoTema dos dados: - populacao: População residente - alfabetizacao: Taxa de alfabetização - domicilios: Características dos domicílios - idade_sexo: Pirâmide etária - religiao: Distribuição por religião - cor_raca: Cor ou raça - rendimento: Rendimento mensal - migracao: Migração - educacao: Nível de instrução - trabalho: Ocupação e trabalho - indigenas: População indígena - quilombolas: População quilombola - saneamento: Abastecimento de água e esgoto - deficiencia: Pessoas com deficiência - nupcialidade: Estado civil - fecundidade: Taxa de fecundidade - listar: Lista tabelas disponíveispopulacao
topNNoTamanho das listas top/bottom quando estatisticas=true sem agruparPor (padrão: 10, máx: 100)
camposNoSelecionar apenas algumas colunas por rótulo, separadas por vírgula (ex: 'Valor,Ano'). Reduz o volume da resposta.
formatoNoFormato de saídatabela
agruparPorNoCom estatisticas=true, agrupa pela coluna informada (rótulo, ex: 'Unidade da Federação', 'Ano') e ranqueia os grupos por soma decrescente (grupos[0] = maior total), cada grupo com sua mini-distribuição. Nome curto ('UF', 'estado', 'cidade', 'região') e rótulo parcial ('Federação') são resolvidos, e a resposta diz em `aviso` por qual coluna agrupou; rótulo que casa com duas colunas é recusado em vez de escolhido
localidadesNoCódigos das localidades ou 'all'all
estatisticasNoComputa estatísticas (mínimo/máximo/média/mediana/desvio-padrão/percentis) sobre TODOS os registros da consulta, antes da paginação, + ranking top/bottom. Use para 'qual o maior/menor', 'média', 'mediana', 'distribuição', 'ranking'. Quando true, ignora pagina, campos e formato
nivel_territorialNoNível territorial (código N): 1=Brasil, 2=Região, 3=UF, 6=Município1

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
anoNoAno(s) de referência
temaNoTema do censo consultado
tabelaNoTabela SIDRA de origem
colunasYesRótulos das colunas, na ordem
descricaoNoDescrição da tabela
registrosYesRegistros: cada um mapeia rótulo da coluna -> valor
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)
estatisticasNoBloco estatístico presente quando estatisticas=true (registros vem vazio nesse modo)
totalRegistrosYesTotal de registros de dados

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv5.0.0
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / agruparPor / description
      Previous value: -"Com estatisticas=true, agrupa pela coluna informada (rótulo, ex: 'Unidade da Federação', 'Ano') e ranqueia os grupos por soma decrescente (grupos[0] = maior total), cada grupo com sua mini-distribuição"New value: +"Com estatisticas=true, agrupa pela coluna informada (rótulo, ex: 'Unidade da Federação', 'Ano') e ranqueia os grupos por soma decrescente (grupos[0] = maior total), cada grupo com sua mini-distribuição. Nome curto ('UF', 'estado', 'cidade', 'região') e rótulo parcial ('Federação') são resolvidos, e a resposta diz em `aviso` por qual coluna agrupou; rótulo que casa com duas colunas é recusado em vez de escolhido"
  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. Changed11 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
    • addedInput schema / properties / agruparPor
      Added value: +{
      +  "description": "Com estatisticas=true, agrupa pela coluna informada (rótulo, ex: 'Unidade da Federação', 'Ano') e ranqueia os grupos por soma decrescente (grupos[0] = maior total), cada grupo com sua mini-distribuição",
      +  "type": "string"
      +}
    • addedInput schema / properties / estatisticas
      Added value: +{
      +  "default": false,
      +  "description": "Computa estatísticas (mínimo/máximo/média/mediana/desvio-padrão/percentis) sobre TODOS os registros da consulta, antes da paginação, + ranking top/bottom. Use para 'qual o maior/menor', 'média', 'mediana', 'distribuição', 'ranking'. Quando true, ignora pagina, campos e formato",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / topN
      Added value: +{
      +  "default": 10,
      +  "description": "Tamanho das listas top/bottom quando estatisticas=true sem agruparPor (padrão: 10, máx: 100)",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • 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 / estatisticas
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Bloco estatístico presente quando estatisticas=true (registros vem vazio nesse modo)",
      +  "properties": {
      +    "agrupadoPor": {
      +      "description": "Rótulo da coluna de agrupamento (com agruparPor)",
      +      "type": "string"
      +    },
      +    "aviso": {
      +      "description": "Avisos sobre agrupamento automático, mistura de unidades ou truncamento",
      +      "type": "string"
      +    },
      +    "bottom": {
      +      "description": "Menores valores (sem agruparPor)",
      +      "items": {
      +        "additionalProperties": {},
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "colunaValor": {
      +      "description": "Rótulo da coluna numérica analisada (sempre 'Valor' no SIDRA)",
      +      "type": "string"
      +    },
      +    "distribuicao": {
      +      "additionalProperties": false,
      +      "description": "Distribuição do conjunto inteiro (sem agruparPor)",
      +      "properties": {
      +        "desvioPadrao": {
      +          "type": "number"
      +        },
      +        "maximo": {
      +          "type": "number"
      +        },
      +        "media": {
      +          "type": "number"
      +        },
      +        "mediana": {
      +          "type": "number"
      +        },
      +        "minimo": {
      +          "type": "number"
      +        },
      +        "n": {
      +          "description": "Registros com valor numérico considerados",
      +          "type": "number"
      +        },
      +        "percentis": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "percentil": {
      +                "description": "Percentil (50 = mediana)",
      +                "type": "number"
      +              },
      +              "rotulo": {
      +                "description": "Enunciado por extenso, pronto para citar ao leitor",
      +                "type": "string"
      +              },
      +              "valor": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "percentil",
      +              "valor",
      +              "rotulo"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "soma": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "n",
      +        "soma",
      +        "minimo",
      +        "maximo",
      +        "media",
      +        "mediana",
      +        "desvioPadrao",
      +        "percentis"
      +      ],
      +      "type": "object"
      +    },
      +    "grupos": {
      +      "description": "Grupos ordenados por soma decrescente, cada um com sua mini-distribuição (com agruparPor)",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "desvioPadrao": {
      +            "type": "number"
      +          },
      +          "grupo": {
      +            "type": "string"
      +          },
      +          "maximo": {
      +            "type": "number"
      +          },
      +          "media": {
      +            "type": "number"
      +          },
      +          "mediana": {
      +            "type": "number"
      +          },
      +          "minimo": {
      +            "type": "number"
      +          },
      +          "n": {
      +            "description": "Registros com valor numérico considerados",
      +            "type": "number"
      +          },
      +          "percentis": {
      +            "items": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "percentil": {
      +                  "description": "Percentil (50 = mediana)",
      +                  "type": "number"
      +                },
      +                "rotulo": {
      +                  "description": "Enunciado por extenso, pronto para citar ao leitor",
      +                  "type": "string"
      +                },
      +                "valor": {
      +                  "type": "number"
      +                }
      +              },
      +              "required": [
      +                "percentil",
      +                "valor",
      +                "rotulo"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "soma": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "n",
      +          "soma",
      +          "minimo",
      +          "maximo",
      +          "media",
      +          "mediana",
      +          "desvioPadrao",
      +          "percentis",
      +          "grupo"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "registrosConsiderados": {
      +      "description": "Registros com valor numérico (contam no n)",
      +      "type": "number"
      +    },
      +    "registrosSemValor": {
      +      "description": "Registros excluídos por marcador de ausência SIDRA ('-', '..', '...', 'X') ou valor não numérico",
      +      "type": "number"
      +    },
      +    "top": {
      +      "description": "Maiores valores, com as colunas de identificação do registro (sem agruparPor)",
      +      "items": {
      +        "additionalProperties": {},
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "totalGrupos": {
      +      "description": "Total de grupos existentes antes do teto (com agruparPor)",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "colunaValor",
      +    "registrosConsiderados",
      +    "registrosSemValor"
      +  ],
      +  "type": "object"
      +}
    • 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"
      +}
    • addedOutput schema / properties / registros / items / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "totalRegistros",
      -  "colunas",
      -  "registros"
      -]New value: +[
      +  "totalRegistros",
      +  "colunas",
      +  "registros",
      +  "provenance",
      +  "attribution"
      +]
  4. Changed3 schema fields changedv3.0.0
    • addedInput schema / properties / campos
      Added value: +{
      +  "description": "Selecionar apenas algumas colunas por rótulo, separadas por vírgula (ex: 'Valor,Ano'). Reduz o volume da resposta.",
      +  "type": "string"
      +}
    • changedInput schema / properties / nivel_territorial / description
      Previous value: -"Nível territorial: 1=Brasil, 2=Região, 3=UF, 6=Município"New value: +"Nível territorial (código N): 1=Brasil, 2=Região, 3=UF, 6=Município"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "ano": {
      +      "description": "Ano(s) de referência",
      +      "type": "string"
      +    },
      +    "colunas": {
      +      "description": "Rótulos das colunas, na ordem",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "descricao": {
      +      "description": "Descrição da tabela",
      +      "type": "string"
      +    },
      +    "registros": {
      +      "description": "Registros: cada um mapeia rótulo da coluna -> valor",
      +      "items": {
      +        "additionalProperties": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "tabela": {
      +      "description": "Tabela SIDRA de origem",
      +      "type": "string"
      +    },
      +    "tema": {
      +      "description": "Tema do censo consultado",
      +      "type": "string"
      +    },
      +    "totalRegistros": {
      +      "description": "Total de registros de dados",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "totalRegistros",
      +    "colunas",
      +    "registros"
      +  ],
      +  "type": "object"
      +}
  5. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the live GET against the public SIDRA API, the Markdown + structuredContent return shape, and rich mode behavior: statistics computed over ALL rows before truncation, campos/formato ignored and registros emptied in that mode, and ambiguity refusal in agruparPor with an aviso field.

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 purpose followed by scannable sections (years, themes, examples, mode, exclusions), so it is easy to navigate. It loses a point for restating content already in the schema, such as the full theme list and year enumeration.

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 nine parameters with an output schema and full annotation coverage, the description supplies exactly what structured fields cannot: mode-switching rules, examples, and sibling routing. An agent has everything needed to select and invoke it 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 cross-parameter interaction semantics (estatisticas=true overrides pagina/campos/formato, agruparPor ranking by descending sum with resolved short labels) and realistic parameter combinations in the examples that the per-property schema text alone does not tie together.

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 ('Queries IBGE Demographic Census data 1970-2022'), names its scope (simplified access without SIDRA table codes), and explicitly routes to three siblings (ibge_cidades, ibge_comparar, ibge_sidra) with the condition that selects each.

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?

Carries a full 'Use a different tool when' block naming alternatives and their conditions, plus four concrete invocation examples and a dedicated explanation of when to enable estatisticas mode. Nothing about tool selection is left to inference.

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