Skip to main content
Glama
julienkalamon

IGN API Carto MCP Server

Get cadastral parcels

ign_get_cadastre_parcelles
Read-onlyIdempotent

Query French cadastral parcels by location or administrative codes to identify land plots for property, urban planning, and administrative needs.

Instructions

Search for cadastral parcels (land plots) in France.

This tool queries the IGN API Carto cadastre module to find parcels by geometry intersection or administrative codes. Useful for property identification, urban planning, and administrative procedures.

Args:

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

  • code_insee (string, optional): INSEE commune code (5 digits)

  • code_dep (string, optional): Department code (2-3 digits)

  • code_com (string, optional): Commune code within department (3 digits)

  • section (string, optional): Cadastral section (2 characters)

  • numero (string, optional): Parcel number

  • source (string): Data source - 'pci' (PCI Express, recommended) or 'bdparcellaire'

  • _limit (number): Max results (1-1000)

  • _start (number): Pagination offset

Returns: GeoJSON FeatureCollection with parcel geometries and properties including:

  • numero: Parcel number

  • feuille: Sheet number

  • section: Cadastral section

  • code_dep, code_com, com_abs, code_arr

  • geometry: MultiPolygon

Examples:

  • "Find parcels in commune 75101" -> code_insee="75101"

  • "Get parcel AB-0001 in section AB" -> section="AB", numero="0001"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geomNoGeoJSON geometry string, e.g. {"type":"Point","coordinates":[2.35,48.85]}
code_inseeNoINSEE commune code (5 digits)
code_depNoDepartment code
code_comNoCommune code within department
sectionNoCadastral section (2 chars)
numeroNoParcel number
sourceNoData source: 'pci' (recommended) or 'bdparcellaire'pci
_limitNoMaximum number of results (1-1000)
_startNoStarting position for pagination
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown

Implementation Reference

  • The core handler function that destructures input params, determines the cadastre API endpoint based on source ('pci' or 'bdparcellaire'), fetches data via apiRequest, and returns either raw JSON or formatted markdown GeoJSON response.
    async (params) => {
      const { source, response_format, ...queryParams } = params;
      const endpoint = source === "pci" ? "/cadastre/parcelle" : "/cadastre/parcelle";
      
      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,
        "Parcelles cadastrales"
      );
      return {
        content: [{ type: "text", text: truncateResponse(markdown, CHARACTER_LIMIT) }],
      };
    }
  • Zod schema for input validation, defining optional parameters for geometry intersection, administrative codes, parcel identifiers, data source, pagination, and response format.
    inputSchema: z.object({
      geom: GeometrySchema.optional(),
      code_insee: z.string().optional().describe("INSEE commune code (5 digits)"),
      code_dep: z.string().optional().describe("Department code"),
      code_com: z.string().optional().describe("Commune code within department"),
      section: z.string().optional().describe("Cadastral section (2 chars)"),
      numero: z.string().optional().describe("Parcel number"),
      source: z
        .enum(["pci", "bdparcellaire"] as const)
        .default("pci")
        .describe("Data source: 'pci' (recommended) or 'bdparcellaire'"),
      ...PaginationSchema,
      response_format: ResponseFormatSchema,
    }).strict(),
  • src/index.ts:119-190 (registration)
    The server.registerTool call that registers the tool with its metadata (title, description, annotations), input schema, and inline handler function.
    server.registerTool(
      "ign_get_cadastre_parcelles",
      {
        title: "Get cadastral parcels",
        description: `Search for cadastral parcels (land plots) in France.
    
    This tool queries the IGN API Carto cadastre module to find parcels by geometry intersection or administrative codes. Useful for property identification, urban planning, and administrative procedures.
    
    Args:
      - geom (string, optional): GeoJSON geometry to intersect
      - code_insee (string, optional): INSEE commune code (5 digits)
      - code_dep (string, optional): Department code (2-3 digits)
      - code_com (string, optional): Commune code within department (3 digits)
      - section (string, optional): Cadastral section (2 characters)
      - numero (string, optional): Parcel number
      - source (string): Data source - 'pci' (PCI Express, recommended) or 'bdparcellaire'
      - _limit (number): Max results (1-1000)
      - _start (number): Pagination offset
    
    Returns:
      GeoJSON FeatureCollection with parcel geometries and properties including:
      - numero: Parcel number
      - feuille: Sheet number
      - section: Cadastral section
      - code_dep, code_com, com_abs, code_arr
      - geometry: MultiPolygon
    
    Examples:
      - "Find parcels in commune 75101" -> code_insee="75101"
      - "Get parcel AB-0001 in section AB" -> section="AB", numero="0001"`,
        inputSchema: z.object({
          geom: GeometrySchema.optional(),
          code_insee: z.string().optional().describe("INSEE commune code (5 digits)"),
          code_dep: z.string().optional().describe("Department code"),
          code_com: z.string().optional().describe("Commune code within department"),
          section: z.string().optional().describe("Cadastral section (2 chars)"),
          numero: z.string().optional().describe("Parcel number"),
          source: z
            .enum(["pci", "bdparcellaire"] as const)
            .default("pci")
            .describe("Data source: 'pci' (recommended) or 'bdparcellaire'"),
          ...PaginationSchema,
          response_format: ResponseFormatSchema,
        }).strict(),
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
      },
      async (params) => {
        const { source, response_format, ...queryParams } = params;
        const endpoint = source === "pci" ? "/cadastre/parcelle" : "/cadastre/parcelle";
        
        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,
          "Parcelles cadastrales"
        );
        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 provide readOnlyHint=true, destructiveHint=false, openWorldHint=true, and idempotentHint=true, covering safety and idempotency. The description adds valuable context about the API source ('IGN API Carto cadastre module'), data source options with a recommendation ('pci' recommended), and pagination behavior (via _limit and _start parameters). It doesn't contradict annotations and enhances understanding of the tool's operational context.

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 well-structured with clear sections (purpose, usage context, Args, Returns, Examples), each sentence adds value, and there's no redundancy. It efficiently conveys necessary information without verbosity, making it easy to scan and understand.

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 tool's complexity (10 parameters, geographic data querying), the description provides comprehensive context: purpose, usage scenarios, parameter explanations with examples, return format details (GeoJSON FeatureCollection with specific properties), and data source guidance. Even without an output schema, the Returns section adequately describes the response structure and content.

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

Parameters4/5

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

With 100% schema description coverage, the schema already documents all parameters thoroughly. The description adds meaningful context by grouping parameters logically (geometry intersection vs. administrative codes), providing real-world examples that map use cases to parameter combinations, and explaining the Returns section in detail with property descriptions. This goes beyond the schema's technical definitions to show how parameters work together.

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 specific action ('search for cadastral parcels'), resource ('in France'), and method ('queries the IGN API Carto cadastre module'). It distinguishes this tool from siblings by specifying it's for parcels rather than administrative limits, communes, or other geographic features, making its purpose unambiguous and differentiated.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('useful for property identification, urban planning, and administrative procedures') and provides concrete examples with parameter mappings (e.g., 'Find parcels in commune 75101' -> code_insee='75101'). This gives clear guidance on appropriate use cases and how to structure queries.

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