Skip to main content
Glama

adminexpress

Retrieve administrative units for any location in France using longitude and latitude coordinates. Access commune, canton, department, region, and other administrative boundaries from Géoplateforme data.

Instructions

Renvoie les unités administratives (commune, canton, collectivite_territoriale, epci, departement, region, arrondissement) pour une position donnée par sa longitude et sa latitude (source : Géoplateforme (WFS, ADMINEXPRESS-COG.LATEST)).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lonYesLa longitude du point
latYesLa latitude du point

Implementation Reference

  • The main handler function that executes the tool logic by calling the getAdminUnits helper with the provided longitude and latitude.
    async execute(input: AdminexpressInput) {
      logger.info(`adminexpress(${input.lon},${input.lat})...`);
      return getAdminUnits(input.lon, input.lat);
    }
  • Input schema definition using Zod validators for longitude (lon) and latitude (lat) parameters.
    schema = {
      lon: {
        type: z.number(),
        description: "La longitude du point",
      },
      lat: {
        type: z.number(),
        description: "La latitude du point",
      },
    };
  • Helper function that performs the WFS query to retrieve administrative units intersecting the given coordinates from the ADMINEXPRESS-COG service.
    export async function getAdminUnits(lon, lat) {
        logger.info(`[adminexpress] getAdminUnits(${lon},${lat})...`);
    
        // note that EPSG:4326 means lat,lon order for GeoServer -> flipped coordinates...
        const cql_filter = `INTERSECTS(geometrie,Point(${lat} ${lon}))`;
    
        // TODO : avoid useless geometry retrieval at WFS level
        const url = 'https://data.geopf.fr/wfs?' + new URLSearchParams({
            service: 'WFS',
            request: 'GetFeature',
            typeName: ADMINEXPRESS_TYPES.map((type) => { return `ADMINEXPRESS-COG.LATEST:${type}` }).join(','),
            outputFormat: 'application/json',
            cql_filter: cql_filter
        }).toString();
    
        const featureCollection = await fetchJSON(url);
        return featureCollection.features.map((feature) => {
            // parse type from id (ex: "commune.3837")
            const type = feature.id.split('.')[0];
            // ignore geometry and extend properties
            return Object.assign({
                type: type,
                id: feature.id,
                bbox: feature.bbox
            }, feature.properties);
        });
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes a read-only operation (returns data) but lacks details on error handling, rate limits, authentication needs, or response format. This is a significant gap for a tool with no annotation coverage.

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 a single, efficient sentence that front-loads the core functionality (returning administrative units) and includes essential details like parameters and data source. There is no wasted text, making it highly concise and well-structured.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It does not explain the return values (e.g., format of administrative units), error conditions, or behavioral traits like performance or limitations. For a tool with no structured output documentation, this leaves significant gaps for an AI agent.

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

Parameters3/5

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

The input schema has 100% description coverage, clearly documenting 'lon' and 'lat' parameters. The description adds context by explaining that these parameters define a position for administrative unit lookup, but it does not provide additional semantics beyond what the schema already states. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: it returns administrative units for a given geographic position using longitude and latitude coordinates. It specifies the resource (administrative units like commune, canton, etc.) and the source (Géoplateforme). However, it does not explicitly differentiate from siblings like 'geocode' or 'cadastre', which might offer related but distinct functionality.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions the data source but does not specify use cases, prerequisites, or exclusions. For example, it does not clarify if this is for administrative lookups only or how it differs from sibling tools like 'geocode' or 'assiette_sup'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ignfab/geocontext'

If you have feedback or need assistance with the MCP directory API, please join our Discord server