Skip to main content
Glama
lucaspmgomess

querido-diario-mcp-server

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

TableJSON Schema
NameRequiredDescriptionDefault
city_nameYes
state_codeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
citiesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It clearly discloses the matching semantics (partial, case-insensitive similarity rather than exact equality) and the post-filtering behavior of state_code. It does not go into return shape or pagination, but an output schema exists and the core behavior is well explained.

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 front-loaded with the core purpose, immediately followed by usage context and parameter semantics. Every paragraph earns its place, including the concrete example that clarifies the intended call flow without excessive verbosity.

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?

For a 2-parameter search tool with no annotations, the description covers purpose, when to call it, how to call it, parameter behavior, and the relationship to sibling tools. An output schema exists, so the lack of return-format detail is acceptable. Nothing essential for correct tool invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description fully compensates. It explains city_name as a partial, case-insensitive name query and state_code as an optional two-letter Brazilian state/UF filter applied after the upstream search, including examples like 'RS' and 'SP' and its disambiguation purpose.

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 ('Find') and a concrete resource ('Brazilian municipalities indexed by Querido Diário'), and explains the tool's unique role: resolving 7-digit IBGE territory IDs. It explicitly differentiates from siblings by noting that both get_city and search_gazettes require the territory ID that this tool provides.

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?

Provides explicit when-to-use guidance: 'Call this FIRST whenever a request names a city but you don't already have its numeric territory ID.' It names the sibling tools and gives a concrete example workflow, effectively telling the agent when to use this tool versus alternatives and what to do after.

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

Deploy Server

Other Tools