Skip to main content
Glama

assiette_sup

Retrieve public utility easement boundaries for specific geographic coordinates using France's Géoplateforme urban planning data.

Instructions

Renvoie les assiettes des servitudes d'utilité publique (SUP) 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 AssietteSupTool class implements the 'assiette_sup' MCP tool, including its name, description, input schema, and the execute handler that delegates to getAssiettesServitudes helper.
    class AssietteSupTool extends MCPTool<SupInput> { name = "assiette_sup"; description = `Renvoie les assiettes des servitudes d'utilité publique (SUP) pour une position donnée par sa longitude et sa latitude (source: ${URBANISME_SOURCE}).`; schema = { lon: { type: z.number(), description: "La longitude du point", }, lat: { type: z.number(), description: "La latitude du point", }, }; async execute(input: SupInput) { logger.info(`assiette_sup(${input.lon},${input.lat})...`); return getAssiettesServitudes(input.lon, input.lat); } }
  • Input schema definition for the 'assiette_sup' tool using Zod for lon and lat validation.
    schema = { lon: { type: z.number(), description: "La longitude du point", }, lat: { type: z.number(), description: "La latitude du point", }, };
  • Core helper function getAssiettesServitudes that performs WFS query to Geoplateforme for SUP assiette features within 30 meters of the given (lon, lat) point.
    export async function getAssiettesServitudes(lon, lat) { logger.info(`getAssiettesServitudes(${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: ASSIETTES_SUP_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); }); }
  • Array of WFS type names used by the assiette_sup tool for querying SUP assiette layers (points, lines, surfaces).
    const ASSIETTES_SUP_TYPES = [ 'wfs_sup:assiette_sup_p', 'wfs_sup:assiette_sup_l', 'wfs_sup:assiette_sup_s', ];

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