Skip to main content
Glama

Municípios vizinhos

ibge_vizinhos
Read-onlyIdempotent

Find neighboring or nearby Brazilian municipalities by IBGE code or name; choose shared-boundary contiguity or a centroid radius, with optional population data.

Instructions

Finds nearby/neighboring municipalities.

Features:

  • Search by IBGE code (7 digits) or municipality name

  • Without raio: returns municipalities that actually touch the reference municipality in the official municipal mesh

  • With raio: returns municipalities whose centroids fall within the requested radius in km

  • Optionally includes population data

Examples:

  • By code: municipio="3550308"

  • By name: municipio="Campinas", uf="SP"

  • With population: municipio="3550308", incluir_dados=true

Contiguity is topological (shared boundary); radius mode is an approximation based on centroid distance. For listing/searching municipalities, use ibge_municipios.

Behavior: read-only and idempotent — uses the public IBGE Localidades and Malhas v3 APIs; population enrichment, when requested, uses SIDRA. Returns a Markdown list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ufNoEstado por sigla (SP), nome (São Paulo) ou código IBGE (35) — obrigatório se usar nome do município
raioNoRaio em km para buscar municípios próximos, calculado pela distância entre centróides municipais
municipioYesCódigo IBGE do município (7 dígitos) ou nome do município
incluir_dadosNoIncluir dados populacionais dos vizinhos

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
totalYesQuantidade de municípios encontrados
vizinhosYesLista de municípios contíguos ou próximos, conforme o critério espacial solicitado
municipioYesMunicípio de referência da consulta
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. First observedv0.6.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), yet the description adds substantive traits: the exact upstream sources (IBGE Localidades, Malhas v3, SIDRA for population), the topological-vs-approximate nature of each mode, and the return format (Markdown list). This is real context an agent cannot get from annotations alone.

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?

Well front-loaded: purpose first, then features, examples, and behavior. Sections earn their place, though the raio/centroid explanation is repeated in both Features and Behavior, which is mild redundancy rather than waste.

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?

Output schema exists, so return-value documentation is not required, but the description still notes the Markdown-list format. Combined with mode semantics, data provenance, and examples, an agent has everything needed to call this 4-parameter 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 it by tying raio's presence to a mode switch and by showing concrete invocation shapes for municipio, uf, and incluir_dados. It does not add format details (e.g. acceptable sigla/nome variants) beyond what the schema already states.

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 ('Finds nearby/neighboring municipalities') and immediately names the sibling it is not ('For listing/searching municipalities, use ibge_municipios'). An agent can distinguish it from the other 20+ ibge_* tools without opening a schema.

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 contrasts the two operating modes (contiguous neighbors vs. radius by centroid distance) and states the selection condition, plus routes listing/searching to ibge_municipios. Worked examples for code, name+uf, and population enrichment remove remaining ambiguity.

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