Skip to main content
Glama

Códigos geográficos do IBGE

ibge_geocodigo
Read-onlyIdempotent

Resolve Brazilian geographic codes and place names. Decode region, state, municipality, or district IBGE codes, or search a locality name to find its code.

Instructions

Decodes IBGE codes or searches codes by locality name.

Features:

  • Decode region, state, municipality, or district codes

  • Search IBGE code by name

  • Show complete geographic hierarchy

  • Return related codes

Code structure:

  • 1 digit: Region (1=North, 2=Northeast, 3=Southeast, 4=South, 5=Central-West)

  • 2 digits: State (11-53)

  • 7 digits: Municipality

  • 9 digits: District

Examples:

  • Decode municipality: codigo="3550308"

  • Decode state: codigo="35"

  • Search by name: nome="São Paulo"

  • Municipality in state: nome="Campinas", uf="SP"

This tool decodes a code's structure and resolves name→code at any level. Use a different tool when:

  • You only need to list/search municipalities → ibge_municipios

  • You want the full detailed record of one locality → ibge_localidade

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNoEstado por sigla (SP), nome (São Paulo) ou código IBGE (35) para restringir a busca por nome de município
nomeNoNome da localidade para encontrar o código IBGE (estado ou município)
codigoNoCódigo IBGE para decodificar. Formatos aceitos: - 1 dígito: Região (1-5) - 2 dígitos: UF (11-53) - 7 dígitos: Município - 9 dígitos: Distrito

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nomeNoNome da localidade resolvida
tipoYesTipo do resultado: localidade decodificada (regiao/uf/municipio/distrito) ou lista de municípios encontrados (lista)
siglaNoSigla da região ou UF, quando aplicável
totalNoQuantidade de municípios encontrados na busca por nome (apenas tipo lista)
codigoNoCódigo IBGE da localidade resolvida (ausente em resultados do tipo lista)
regiaoNoNome da região à qual a UF pertence (apenas tipo uf)
estadosNoEstados pertencentes à região (apenas tipo regiao)
matchesNoMunicípios encontrados na busca por nome (apenas tipo lista)
hierarquiaNoHierarquia geográfica completa, da região ao município/distrito (tipo municipio/distrito)
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)
codigoSidraNoCódigo SIDRA de 6 dígitos do município (apenas tipo municipio)
regiaoCodigoNoCódigo IBGE da região à qual a UF pertence (apenas tipo uf)
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, open-world, and non-destructive hints, and the description adds concrete behavior: 'a live GET against the public IBGE Localidades API' and 'Returns Markdown.' It enriches the structured hints without contradicting them.

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 well-structured with features, code structure, examples, tool-selection guidance, and behavior. It is longer than average but every section serves a distinct purpose, and the core purpose is front-loaded.

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?

With an output schema present and three optional parameters, the description fully covers what the tool does, how parameters combine, code format rules, alternatives, and behavioral characteristics. Nothing an agent needs to call it correctly is missing.

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?

The schema already covers all three parameters with descriptions, so the baseline is 3. The description adds value by explaining code-length structure, region number mapping, and practical usage combinations like nome='Campinas', uf='SP', going beyond the schema.

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 opens with a specific verb and resource: 'Decodes IBGE codes or searches codes by locality name.' It also distinguishes itself by naming sibling tools it is not, making its purpose unmistakable.

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 explicitly says 'Use a different tool when' and lists ibge_municipios for listing/searching municipalities and ibge_localidade for full detailed records. This gives clear routing guidance beyond stating what the tool does.

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

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/SidneyBissoli/ibge-br-mcp'

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