Skip to main content
Glama
gghez

mcp-gouv-fr

by gghez

geo_search_communes

Search French communes by name, postal code, or department code. Use at least one filter for bounded results.

Instructions

Search communes by name, postal code, and/or parent department.

At least one of nom, code_postal, or code_departement must be non-empty so the query stays bounded (the upstream API can return very large slices without filters).

Args: nom: Substring or fuzzy name (e.g. Paris); optional if other filters are set. code_postal: Five-digit postal code; optional if other filters are set. code_departement: Department code (e.g. 75); optional if other filters are set. boost_population: When true, rank name search by population (upstream boost param). limit: Maximum number of results (keep small, e.g. ≤ 50).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nomNo
limitNo
code_postalNo
boost_populationNo
code_departementNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
communesNoMatching communes in API order (often best match first when searching by name).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It does add valuable context: the upstream API can return large slices, hence the bounded-query requirement, and explains the boost_population ranking effect. However, it does not mention authentication, rate limits, or whether this is a read-only operation (trivially implied by 'search'). Some behavioral aspects like pagination or error handling are absent, though the output schema may cover returns.

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 compact and well-organized: a one-line purpose, a critical usage constraint, and then a clean Args list. Every sentence earns its place; the most important operational caveat (bounded query) is highlighted early. No redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers all parameters, their optionality, the mandatory filter requirement, and safe usage limits. Since an output schema exists, not describing the return format is acceptable. The only minor gap is lack of explicit differentiation from geo_get_commune, but the search semantics are clear. Overall, an agent can correctly call this tool with confidence.

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?

The description includes an explicit Args section that explains every parameter: nom (substring/fuzzy), code_postal (five-digit), code_departement (department code), boost_population (ranking by population), and limit (maximum results). It also states the interdependency constraint (at least one of the three filters). The input schema provides no descriptions of its own, so this description adds substantial meaning beyond types and defaults.

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 opens with 'Search communes by name, postal code, and/or parent department' – a clear verb, resource, and search criteria. This immediately differentiates it from siblings like geo_search_departements or geo_search_regions, which target different geographies. The purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly states a required precondition ('At least one of nom, code_postal, or code_departement must be non-empty') and gives guidance on limit ('keep small, e.g. ≤ 50'). It does not explicitly contrast with geo_get_commune (which likely retrieves by ID), but the search-oriented purpose is implied clearly enough from the name and context. No misleading exclusions.

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