Skip to main content
Glama

Detalhes de localidade

ibge_localidade
Read-onlyIdempotent

Returns details of a specific locality by IBGE code.

Features:

  • State information (2-digit code)

  • Municipality information (7-digit code)

  • District information (9-digit code)

  • Complete hierarchy (region, mesoregion, microregion)

Examples:

  • São Paulo state: codigo=35

  • São Paulo city: codigo=3550308

  • District: codigo=355030805

This tool returns the full record of ONE locality you already have the code for. Use a different tool when:

  • You have a name and need the code → ibge_municipios (municipalities) or ibge_geocodigo (any level)

  • You want to decompose/understand a code's structure → ibge_geocodigo

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tipoNoTipo da localidade. Se não informado, será inferido pelo tamanho do código.
codigoYesCódigo IBGE da localidade (estado: 2 dígitos, município: 7 dígitos, distrito: 9 dígitos)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCódigo IBGE da localidade
nomeYesNome da localidade
tipoYesTipo da localidade retornada
siglaNoSigla da UF (apenas para estados)
estadoNoEstado da localidade (município ou distrito)
regiaoNoRegião do estado (apenas para estados)
municipioNoMunicípio ao qual o distrito pertence (apenas para distritos)
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)
mesorregiaoNoMesorregião do município
microrregiaoNoMicrorregião do município
regiaoImediataNoRegião imediata do município
regiaoIntermediariaNoRegião intermediária do município

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description goes further by adding 'a live GET against the public IBGE Localidades API' (network call, no auth gate), 'Returns a Markdown record' (output format), and 'complete hierarchy' details. This enriches the annotation-backed safety profile with concrete operational context, though it stops short of discussing error cases.

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-organized with a leading purpose sentence, bulleted features, practical examples, alternative-tool routing, and a concise behavior note. Every section earns its place, and the most important scoping statement is front-loaded early.

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 simple two-parameter schema, an existing output schema, and comprehensive annotations, the description covers all essential angles: exact purpose, parameter examples, differentiation from siblings, and behavioral expectations. An agent can invoke this tool correctly without needing further clarification.

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 adds value by giving real-world examples mapping code lengths to entity types (35, 3550308, 355030805) and by describing the hierarchy output that codigo unlocks. It does not, however, deepen the meaning of the optional tipo parameter beyond the schema's inference note.

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 states a clear action and resource: 'Returns details of a specific locality by IBGE code.' It differentiates from siblings by explicitly naming ibge_municipios and ibge_geocodigo and the conditions under which they should be used instead, so an agent can correctly identify this tool's unique scope.

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 gives explicit when-to-use guidance: 'returns the full record of ONE locality you already have the code for.' It then names exact alternatives and their triggers, such as using ibge_municipios or ibge_geocodigo when you have a name but not a code, and ibge_geocodigo for code decomposition. This leaves no ambiguity about selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.