Skip to main content
Glama
julienkalamon

IGN API Carto MCP Server

Get protected natural areas

ign_get_nature_areas
Read-onlyIdempotent

Query protected natural areas in France including Natura 2000 sites, national parks, ZNIEFF zones, and other conservation areas using geographic coordinates or identifiers.

Instructions

Query protected natural areas in France (Natura 2000, ZNIEFF, national parks, etc.).

Available layers:

  • natura2000-oiseaux: Natura 2000 bird directive sites

  • natura2000-habitat: Natura 2000 habitat directive sites

  • rnc: Corsican natural reserves

  • rnn: National natural reserves

  • rncf: Hunting and wildlife natural reserves

  • pn: National parks

  • pnr: Regional natural parks

  • znieff1: ZNIEFF type 1 (remarkable ecological areas)

  • znieff2: ZNIEFF type 2 (large natural ensembles)

  • sic: Sites of Community Importance

  • zps: Special Protection Areas

Args:

  • layer (string): Nature layer to query

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

  • id_mnhn (string, optional): MNHN identifier

  • _limit (number): Max results

  • _start (number): Pagination offset

Returns: GeoJSON FeatureCollection with protected area boundaries and attributes.

Examples:

  • "Find Natura 2000 sites at this location" -> layer="natura2000-habitat", geom=...

  • "Get ZNIEFF zones near Paris" -> layer="znieff1", geom=...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerYesNature layer to query
geomNoGeoJSON geometry string, e.g. {"type":"Point","coordinates":[2.35,48.85]}
id_mnhnNoMNHN (Natural History Museum) identifier
_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 handler function for 'ign_get_nature_areas' tool. It takes parameters including layer and optional geom/id_mnhn/etc., calls the API endpoint `/nature/${layer}` with query params, fetches GeoJSON data, and returns either raw JSON or Markdown-formatted response.
    async (params) => {
      const { layer, response_format, ...queryParams } = params;
      const endpoint = `/nature/${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,
        `Espaces naturels - ${layer}`
      );
      return {
        content: [{ type: "text", text: truncateResponse(markdown, CHARACTER_LIMIT) }],
      };
    }
  • Zod schema defining the enum of valid 'layer' values specific to the ign_get_nature_areas tool (protected natural areas layers).
    const NatureLayerSchema = z.enum([
      "natura2000-oiseaux",
      "natura2000-habitat", 
      "rnc",
      "rnn",
      "rncf",
      "pn",
      "pnr",
      "znieff1",
      "znieff2",
      "sic",
      "zps",
    ] as const);
  • src/index.ts:337-405 (registration)
    Registration of the 'ign_get_nature_areas' tool using server.registerTool, including title, description, inputSchema (using NatureLayerSchema), annotations, and inline handler function.
    server.registerTool(
      "ign_get_nature_areas",
      {
        title: "Get protected natural areas",
        description: `Query protected natural areas in France (Natura 2000, ZNIEFF, national parks, etc.).
    
    Available layers:
    - natura2000-oiseaux: Natura 2000 bird directive sites
    - natura2000-habitat: Natura 2000 habitat directive sites
    - rnc: Corsican natural reserves
    - rnn: National natural reserves
    - rncf: Hunting and wildlife natural reserves
    - pn: National parks
    - pnr: Regional natural parks
    - znieff1: ZNIEFF type 1 (remarkable ecological areas)
    - znieff2: ZNIEFF type 2 (large natural ensembles)
    - sic: Sites of Community Importance
    - zps: Special Protection Areas
    
    Args:
      - layer (string): Nature layer to query
      - geom (string, optional): GeoJSON geometry to intersect
      - id_mnhn (string, optional): MNHN identifier
      - _limit (number): Max results
      - _start (number): Pagination offset
    
    Returns:
      GeoJSON FeatureCollection with protected area boundaries and attributes.
    
    Examples:
      - "Find Natura 2000 sites at this location" -> layer="natura2000-habitat", geom=...
      - "Get ZNIEFF zones near Paris" -> layer="znieff1", geom=...`,
        inputSchema: z.object({
          layer: NatureLayerSchema.describe("Nature layer to query"),
          geom: GeometrySchema.optional(),
          id_mnhn: z.string().optional().describe("MNHN (Natural History Museum) identifier"),
          ...PaginationSchema,
          response_format: ResponseFormatSchema,
        }).strict(),
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
      },
      async (params) => {
        const { layer, response_format, ...queryParams } = params;
        const endpoint = `/nature/${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,
          `Espaces naturels - ${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 read-only, open-world, idempotent, and non-destructive characteristics. The description adds valuable context about the specific geographic scope (France), available data layers with detailed explanations, and the return format (GeoJSON FeatureCollection). This goes beyond what annotations provide without contradicting them.

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 and front-loaded with the core purpose, followed by organized sections for layers, arguments, returns, and examples. Every sentence serves a clear purpose with zero wasted content, making it easy for an agent to parse and understand quickly.

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

Completeness4/5

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

Given the tool's moderate complexity (6 parameters, geographic queries) and rich annotations, the description provides good contextual coverage. It explains the geographic scope, available data layers, and return format. The main gap is the lack of an output schema, but the description compensates by specifying the return type as GeoJSON FeatureCollection.

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?

With 100% schema description coverage, the baseline is 3. The description adds minimal parameter semantics beyond the schema - it lists available layers with brief explanations and provides example usage patterns, but doesn't significantly enhance understanding of parameter interactions or edge cases beyond what's already documented in the schema.

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 ('Query protected natural areas in France') and resource types (Natura 2000, ZNIEFF, national parks, etc.). It distinguishes this tool from sibling tools by focusing exclusively on natural area data rather than administrative, cadastral, or other geographic data types.

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

Usage Guidelines3/5

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

The description provides implied usage through the examples showing when to use specific layer parameters, but lacks explicit guidance on when to choose this tool versus alternatives. No sibling tool comparisons or exclusion criteria are provided, leaving the agent to infer based on tool names alone.

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