Skip to main content
Glama
julienkalamon

IGN API Carto MCP Server

Get urban planning data (GPU)

ign_get_gpu_urbanisme
Read-onlyIdempotent

Query French urban planning data including zoning, local plans, and public utility easements from the Géoportail de l'Urbanisme (GPU) database.

Instructions

Query the Géoportail de l'Urbanisme (GPU) for urban planning documents and zones.

This tool accesses French urban planning data including local urban plans (PLU), zoning, and public utility easements.

Available layers:

  • municipality: Check if commune is under RNU (national regulation)

  • document: Urban planning documents (PLU, PLUi, CC)

  • zone-urba: Urban zones (U, AU, A, N)

  • secteur-cc: Community map sectors

  • prescription-surf/lin/pct: Surface/linear/point prescriptions

  • info-surf/lin/pct: Informative zones

  • assiette-sup-s/l/p: Public utility easement footprints

  • generateur-sup-s/l/p: Public utility easement generators

Args:

  • layer (string): GPU layer to query

  • geom (string, optional): GeoJSON geometry to intersect

  • partition (string, optional): Document partition ID

  • categorie (string, optional): SUP category filter

  • _limit (number): Max results

  • _start (number): Pagination offset

Returns: GeoJSON FeatureCollection with urban planning data.

Examples:

  • "Is this commune under RNU?" -> layer="municipality", geom=...

  • "What's the zoning at this address?" -> layer="zone-urba", geom=...

  • "Find building prescriptions here" -> layer="prescription-surf", geom=...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerYesGPU layer to query
geomNoGeoJSON geometry string, e.g. {"type":"Point","coordinates":[2.35,48.85]}
partitionNoDocument partition ID
categorieNoSUP category filter
_limitNoMaximum number of results (1-1000)
_startNoStarting position for pagination
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown

Implementation Reference

  • Handler function for the 'ign_get_gpu_urbanisme' tool. It destructures parameters, constructs the GPU endpoint based on the layer, calls apiRequest to fetch data, and returns either JSON or Markdown-formatted GeoJSON response.
    async (params) => {
      const { layer, response_format, ...queryParams } = params;
      const endpoint = `/gpu/${layer}`;
      
      const data = await apiRequest<unknown>(endpoint, {
        params: queryParams as Record<string, string | number | boolean | undefined>,
      });
    
      if (response_format === ResponseFormat.JSON) {
        return {
          content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
        };
      }
    
      const markdown = formatGeoJSONToMarkdown(
        data as import("./types.js").GeoJSONFeatureCollection,
        `Urbanisme GPU - ${layer}`
      );
      return {
        content: [{ type: "text", text: truncateResponse(markdown, CHARACTER_LIMIT) }],
      };
    }
  • Input schema validation using Zod for the ign_get_gpu_urbanisme tool, defining parameters like layer, geom, partition, categorie, pagination, and response_format.
    inputSchema: z.object({
      layer: GPULayerSchema.describe("GPU layer to query"),
      geom: GeometrySchema.optional(),
      partition: z.string().optional().describe("Document partition ID"),
      categorie: z.string().optional().describe("SUP category filter"),
      ...PaginationSchema,
      response_format: ResponseFormatSchema,
    }).strict(),
  • Zod enum schema defining valid GPU layers for urban planning data queries.
    const GPULayerSchema = z.enum([
      "municipality",
      "document",
      "zone-urba",
      "secteur-cc",
      "prescription-surf",
      "prescription-lin",
      "prescription-pct",
      "info-surf",
      "info-lin",
      "info-pct",
      "assiette-sup-s",
      "assiette-sup-l",
      "assiette-sup-p",
      "generateur-sup-s",
      "generateur-sup-l",
      "generateur-sup-p",
    ] as const);
  • src/index.ts:430-500 (registration)
    Registration of the ign_get_gpu_urbanisme tool on the MCP server, including metadata, input schema, annotations, and inline handler function.
    server.registerTool(
      "ign_get_gpu_urbanisme",
      {
        title: "Get urban planning data (GPU)",
        description: `Query the Géoportail de l'Urbanisme (GPU) for urban planning documents and zones.
    
    This tool accesses French urban planning data including local urban plans (PLU), zoning, and public utility easements.
    
    Available layers:
    - municipality: Check if commune is under RNU (national regulation)
    - document: Urban planning documents (PLU, PLUi, CC)
    - zone-urba: Urban zones (U, AU, A, N)
    - secteur-cc: Community map sectors
    - prescription-surf/lin/pct: Surface/linear/point prescriptions
    - info-surf/lin/pct: Informative zones
    - assiette-sup-s/l/p: Public utility easement footprints
    - generateur-sup-s/l/p: Public utility easement generators
    
    Args:
      - layer (string): GPU layer to query
      - geom (string, optional): GeoJSON geometry to intersect
      - partition (string, optional): Document partition ID
      - categorie (string, optional): SUP category filter
      - _limit (number): Max results
      - _start (number): Pagination offset
    
    Returns:
      GeoJSON FeatureCollection with urban planning data.
    
    Examples:
      - "Is this commune under RNU?" -> layer="municipality", geom=...
      - "What's the zoning at this address?" -> layer="zone-urba", geom=...
      - "Find building prescriptions here" -> layer="prescription-surf", geom=...`,
        inputSchema: z.object({
          layer: GPULayerSchema.describe("GPU layer to query"),
          geom: GeometrySchema.optional(),
          partition: z.string().optional().describe("Document partition ID"),
          categorie: z.string().optional().describe("SUP category filter"),
          ...PaginationSchema,
          response_format: ResponseFormatSchema,
        }).strict(),
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
      },
      async (params) => {
        const { layer, response_format, ...queryParams } = params;
        const endpoint = `/gpu/${layer}`;
        
        const data = await apiRequest<unknown>(endpoint, {
          params: queryParams as Record<string, string | number | boolean | undefined>,
        });
    
        if (response_format === ResponseFormat.JSON) {
          return {
            content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
          };
        }
    
        const markdown = formatGeoJSONToMarkdown(
          data as import("./types.js").GeoJSONFeatureCollection,
          `Urbanisme GPU - ${layer}`
        );
        return {
          content: [{ type: "text", text: truncateResponse(markdown, CHARACTER_LIMIT) }],
        };
      }
    );
Behavior4/5

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

Annotations already cover key traits (read-only, open-world, idempotent, non-destructive), so the bar is lower. The description adds valuable context beyond annotations by listing available layers (e.g., municipality, zone-urba) and specifying the return type (GeoJSON FeatureCollection), which helps the agent understand data structure and scope. It does not mention rate limits or authentication needs, but with annotations provided, this is sufficient for a high score.

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 well-structured and appropriately sized, with clear sections (overview, available layers, args, returns, examples). Every sentence adds value, such as explaining data types or providing practical examples. It could be slightly more concise by integrating the layer list into the schema context, but overall it is efficient and front-loaded with key information.

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

Completeness5/5

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

Given the complexity (7 parameters, 100% schema coverage, rich annotations), the description is complete enough. It covers purpose, data scope, parameters, return format, and usage examples. Although there is no output schema, the description specifies the return type (GeoJSON FeatureCollection), which compensates adequately. The annotations provide safety and behavioral context, making this description comprehensive for the tool's needs.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds minimal parameter semantics beyond the schema: it lists layer options and provides examples linking parameters to use cases (e.g., layer='municipality' for RNU checks). However, it does not explain parameter interactions or provide additional syntax details, staying close to what the schema already documents.

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 clearly states the tool's purpose: 'Query the Géoportail de l'Urbanisme (GPU) for urban planning documents and zones.' It specifies the exact resource (French urban planning data) and distinguishes from siblings by focusing on urban planning rather than administrative limits, cadastre, or other geographic data. The title reinforces this with 'Get urban planning data (GPU).'

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 provides clear context for when to use this tool through examples (e.g., 'Is this commune under RNU?' or 'What's the zoning at this address?'), which implicitly guides usage. However, it does not explicitly state when to use alternatives or exclude specific scenarios, and it does not mention sibling tools like ign_get_cadastre_parcelles for comparison, leaving some guidance gaps.

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/julienkalamon/ign-apicarto-mcp-server'

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