search_cities
Resolve Brazilian city names into 7-digit IBGE territory IDs, required for gazette lookups. Optionally filter by state code to disambiguate cities with the same name.
Instructions
Find Brazilian municipalities indexed by Querido Diário and resolve their 7-digit IBGE territory IDs.
Call this FIRST whenever a request names a city but you don't already have its
numeric territory ID — both `get_city` and `search_gazettes` require that ID, not
a city name. For example, to answer "find gazettes about ACME in Porto Alegre",
first call search_cities(city_name="Porto Alegre") to get its territory_id, then
pass that ID to search_gazettes.
Matching is by partial, case-insensitive name similarity (as implemented by the
upstream API), not exact string equality, so it tolerates minor spelling
variation. `state_code` is an optional two-letter Brazilian state/UF filter
(e.g. "RS", "SP") applied after the upstream search, useful for disambiguating
cities that share a name across different states.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city_name | Yes | ||
| state_code | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cities | Yes |