Skip to main content
Glama
gghez

mcp-gouv-fr

by gghez

geo_get_commune

Retrieve a French commune's official details by entering its 5-character INSEE municipality code. Get accurate administrative information for mainland France, including Corsica's 2A/2B codes.

Instructions

Return one commune by INSEE municipality code.

Args: code: INSEE code commune (5 characters for mainland; includes Corsica 2A/2B departments' communes with standard 5-digit codes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nomYesCommune name.
codeYesINSEE municipality code (``code commune``), 5 characters for mainland.
_scoreNoRelevance score for fuzzy name search; absent on exact or non-search calls.
regionNoParent region when nested in the payload.
surfaceNoArea in hectares when provided by the API.
populationNoPopulation figure when requested via ``fields`` on the detail endpoint.
departementNoParent department when nested in the payload.
codesPostauxNoPostal codes served by this commune when the API includes them.

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, the description carries the burden of behavioral disclosure. It usefully explains the code format and the Corsica 2A/2B edge case, but it does not describe behavior for invalid or not-found codes, or any other runtime traits. This is moderate but incomplete.

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: one sentence states the core purpose, and the second sentence explains the parameter format. There is no filler or repetition.

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?

For a single-parameter get-by-code tool with an output schema, the description is nearly complete. It could additionally mention using geo_search_communes when a code is not known, but that is a minor enhancement rather than a critical gap.

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 schema only defines 'code' as a required string, while the description adds substantial meaning: it is an INSEE commune code, exactly 5 characters, with a specific note about Corsica. This fully compensates for the 0% schema description coverage.

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 uses a specific verb ('Return') with a precise resource ('one commune') and identifier ('INSEE municipality code'). This clearly distinguishes it from sibling tools like geo_search_communes, which search, and geo_get_departement, which targets a different geographic entity.

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 usage context is clear: call this tool when you have a specific INSEE commune code and need the corresponding commune. It does not explicitly name alternatives or exclusions, so it falls just short of a 5, but the get-by-code framing leaves little ambiguity.

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