Skip to main content
Glama
Hug0x0

mcp-reunion

reunion_list_iris

List IRIS (sub-communal statistical zones) for a commune in La Réunion. Returns IRIS code, name, type, commune, EPCI, and grand-quartier details.

Instructions

List IRIS (Îlots Regroupés pour l'Information Statistique) — INSEE's fine sub-communal statistical geography (~2000 inhabitants per zone), used for census, income, poverty, employment data. Returns IRIS code (9 digits), name, IRIS type (H = habitat, A = activité, D = divers), commune name and code, EPCI name, grand-quartier code and name, year reference. Combine with reunion_iris_profile (commune module) for cross-dataset IRIS analysis or reunion_get_income_poverty_by_iris (economy module).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
communeNoCommune name prefix match
limitNoMax IRIS to return (1-500, default 100)

Implementation Reference

  • The async handler function that executes the 'reunion_list_iris' tool logic. Queries the 'iris-millesime-france' dataset with optional commune name filter, maps results to IRIS fields (code, name, type, commune, EPCI, grand-quartier, year).
    async ({ commune, limit }) => {
      try {
        const data = await client.getRecords<RecordObject>(DATASET_IRIS, {
          where: buildWhere([commune ? `com_name LIKE ${quote(`${commune}%`)}` : undefined]),
          limit,
        });
        return jsonResult({
          total_iris: data.total_count,
          iris: data.results.map((row) => ({
            code: pickString(row, ['iris_code']),
            name: pickString(row, ['iris_name']),
            type: pickString(row, ['iris_type']),
            commune_name: pickString(row, ['com_name']),
            commune_code: pickString(row, ['com_code']),
            epci_name: pickString(row, ['epci_name']),
            grand_quartier_code: pickString(row, ['iris_grd_quart_code']),
            grand_quartier_name: pickString(row, ['iris_grd_quart_name']),
            year: pickString(row, ['year']),
          })),
        });
      } catch (error) {
        return errorResult(error instanceof Error ? error.message : 'Failed to list IRIS');
      }
    }
  • Input schema for the tool: optional 'commune' string (prefix match) and 'limit' integer (1-500, default 100).
    {
      commune: z.string().optional().describe('Commune name prefix match'),
      limit: z.number().int().min(1).max(500).default(100).describe('Max IRIS to return (1-500, default 100)'),
    },
  • Registration of 'reunion_list_iris' as an MCP tool via server.tool(), with description, schema, and handler. Part of registerGeographyTools() which is called from src/modules/index.ts line 43.
    server.tool(
      'reunion_list_iris',
      'List IRIS (Îlots Regroupés pour l\'Information Statistique) — INSEE\'s fine sub-communal statistical geography (~2000 inhabitants per zone), used for census, income, poverty, employment data. Returns IRIS code (9 digits), name, IRIS type (H = habitat, A = activité, D = divers), commune name and code, EPCI name, grand-quartier code and name, year reference. Combine with reunion_iris_profile (commune module) for cross-dataset IRIS analysis or reunion_get_income_poverty_by_iris (economy module).',
      {
        commune: z.string().optional().describe('Commune name prefix match'),
        limit: z.number().int().min(1).max(500).default(100).describe('Max IRIS to return (1-500, default 100)'),
      },
      async ({ commune, limit }) => {
        try {
          const data = await client.getRecords<RecordObject>(DATASET_IRIS, {
            where: buildWhere([commune ? `com_name LIKE ${quote(`${commune}%`)}` : undefined]),
            limit,
          });
          return jsonResult({
            total_iris: data.total_count,
            iris: data.results.map((row) => ({
              code: pickString(row, ['iris_code']),
              name: pickString(row, ['iris_name']),
              type: pickString(row, ['iris_type']),
              commune_name: pickString(row, ['com_name']),
              commune_code: pickString(row, ['com_code']),
              epci_name: pickString(row, ['epci_name']),
              grand_quartier_code: pickString(row, ['iris_grd_quart_code']),
              grand_quartier_name: pickString(row, ['iris_grd_quart_name']),
              year: pickString(row, ['year']),
            })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to list IRIS');
        }
      }
    );
  • Helper imports used by the tool: buildWhere, errorResult, jsonResult, pickString, quote from '../utils/helpers.js'.
    import { buildWhere, errorResult, jsonResult, pickNumber, pickString, quote } from '../utils/helpers.js';
  • Dataset constant DATASET_IRIS = 'iris-millesime-france' used by the handler to query IRIS records.
    const DATASET_IRIS = 'iris-millesime-france';
    const DATASET_SAINT_DENIS_QUARTERS = 'les-20-quartiers-villesaintdenis';
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It does not mention rate limits, authentication, destructive actions, or any side effects. It does describe what the tool returns, but that is output-related, not behavioral. The description is accurate but lacks 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.

Conciseness4/5

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

The description is moderately concise (three sentences) and front-loaded with the core purpose. It efficiently defines IRIS and lists return fields, though the list is somewhat verbose. Every sentence adds value, but could be slightly trimmed without losing meaning.

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 simplicity (list with two optional parameters, no output schema), the description is very complete. It explains what IRIS is, what fields are returned, and how to use it with sibling tools. It covers the necessary context for an agent to invoke it correctly.

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 score is 3. The description adds context by stating 'commune name prefix match' for the commune parameter and explaining the limit range, but these are mostly restatements of the schema descriptions. No additional meaning beyond what the schema provides.

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 lists IRIS zones, defines what IRIS is ('INSEE's fine sub-communal statistical geography'), and enumerates the returned fields (code, name, type, etc.). The verb 'List' and resource 'IRIS' are specific and distinct from siblings.

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 explains the use case (census, income, poverty, employment data) and explicitly mentions sibling tools 'reunion_iris_profile' and 'reunion_get_income_poverty_by_iris' for cross-dataset analysis, providing guidance on when to combine tools. However, it does not explicitly state when not to use this tool.

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/Hug0x0/mcp-reunion'

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