ibge_vizinhos
Find neighboring municipalities in Brazil by IBGE code or name. Optionally include population data. Uses mesoregion for proximity approximation.
Instructions
Finds nearby/neighboring municipalities.
Features:
Search by IBGE code (7 digits) or municipality name
Returns municipalities in the same mesoregion (proximity approximation)
Optionally includes population data
Note: Uses mesoregion as geographic proximity proxy. For exact spatial neighborhood, mesh processing would be required.
Examples:
By code: municipio="3550308"
By name: municipio="Campinas", uf="SP"
With population: municipio="3550308", incluir_dados=true
Note: proximity is approximated by shared mesoregion (not exact spatial adjacency). For listing/searching municipalities, use ibge_municipios.
Behavior: read-only and idempotent — a live GET against the public IBGE Localidades API. Returns a Markdown list.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| municipio | Yes | Código IBGE do município (7 dígitos) ou nome do município | |
| uf | No | Estado por sigla (SP), nome (São Paulo) ou código IBGE (35) — obrigatório se usar nome do município | |
| raio | No | Raio em km para buscar municípios próximos (usa centróides) | |
| incluir_dados | No | Incluir dados populacionais dos vizinhos |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| municipio | Yes | Município de referência da consulta | |
| vizinhos | Yes | Lista de municípios próximos (mesma mesorregião) | |
| total | Yes | Quantidade de municípios próximos encontrados |