Skip to main content
Glama

urbanisme

Retrieve urban planning regulations (PLU, PLUi, POS, CC, PSMV) for specific coordinates using France's Géoplateforme data to check land use restrictions and zoning information.

Instructions

Renvoie les informations du document d'urbanisme (PLU, PLUi, POS, CC, PSMV) pour une position donnée par sa longitude et sa latitude (source: Géoplateforme - (WFS Géoportail de l'Urbanisme)).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lonYesLa longitude du point
latYesLa latitude du point

Implementation Reference

  • The execute method of UrbanismeTool, which handles the tool invocation by logging and calling the getUrbanisme helper function.
    async execute(input: UrbanismeInput) {
      logger.info(`urbanisme(${input.lon},${input.lat})...`);
      return getUrbanisme(input.lon, input.lat);
    }
  • Zod-based input schema defining longitude (lon) and latitude (lat) as numbers with descriptions.
    schema = {
      lon: {
        type: z.number(),
        description: "La longitude du point",
      },
      lat: {
        type: z.number(),
        description: "La latitude du point",
      },
    };
  • Class definition extending MCPTool, setting the tool name to 'urbanisme' and providing a detailed description including the data source.
    class UrbanismeTool extends MCPTool<UrbanismeInput> {
      name = "urbanisme";
      description = `Renvoie les informations du document d'urbanisme (PLU, PLUi, POS, CC, PSMV) pour une position donnée par sa longitude et sa latitude (source: ${URBANISME_SOURCE}).`;
  • Helper function that performs the actual API call to Géoplateforme WFS service to retrieve urbanisme features (SCOT, PLU, etc.) within 30 meters of the given coordinates, processes the features to include type, id, bbox, and distance.
    export async function getUrbanisme(lon, lat) {
        logger.info(`getUrbanisme(${lon},${lat})...`);
    
        // note that EPSG:4326 means lat,lon order for GeoServer -> flipped coordinates...
        const cql_filter = `DWITHIN(the_geom,Point(${lat} ${lon}),30,meters)`;
    
        const sourceGeom = {
            "type": "Point",
            "coordinates": [lon,lat]
        };
    
        // TODO : avoid useless geometry retrieval at WFS level
        const url = 'https://data.geopf.fr/wfs?' + new URLSearchParams({
            service: 'WFS',
            request: 'GetFeature',
            typeName: URBANISME_TYPES.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,
                distance: (distance(
                    sourceGeom,
                    feature.geometry
                ) * 1000.0)
            }, feature.properties);
        });
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('renvoie') and mentions the data source, but doesn't disclose important behavioral traits like whether this requires authentication, rate limits, error conditions, response format, or what happens with invalid coordinates. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise - a single sentence that efficiently communicates the core functionality. It's front-loaded with the main purpose and includes the data source as useful context. There's no wasted verbiage, though it could potentially benefit from slightly more structure for complex use cases.

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 that there are no annotations and no output schema, the description is incomplete for effective tool use. While it states what the tool does, it doesn't explain what information is returned (beyond 'urban planning document information'), the format of the response, error handling, or any constraints. For a tool with 2 parameters and no structured metadata, the description should provide more complete context.

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 schema description coverage is 100%, with both parameters (lon, lat) clearly documented in the schema. The description adds context that these coordinates are used to retrieve urban planning information, but doesn't provide additional semantic details beyond what the schema already states about longitude and latitude parameters. This meets the baseline for high schema coverage.

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 urban planning document information (PLU, PLUi, POS, CC, PSMV) for a given longitude/latitude position. It specifies the verb 'renvoie' (returns) and the resource 'informations du document d'urbanisme', and mentions the data source. However, it doesn't explicitly differentiate from sibling tools like 'cadastre' or 'geocode' that might also handle geographic data.

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 doesn't mention when this tool is appropriate compared to sibling tools like 'cadastre' (which might handle land registry data) or 'geocode' (which might handle address-to-coordinate conversion), nor does it specify any prerequisites or exclusions for usage.

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