Skip to main content
Glama
Hug0x0

mcp-reunion

reunion_list_cantons

List electoral cantons of La Réunion with details like code, name, type, and polling bureau for departmental election analysis.

Instructions

List the electoral cantons of La Réunion (used for departmental elections, "élections cantonales/départementales"). Each canton elects a binôme (2 conseillers départementaux). Returns canton code, name, current code (handles redistricting), type, department, region, central polling-bureau, year reference. Useful for electoral analysis, conseil départemental research.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax cantons to return (1-100, default 50)

Implementation Reference

  • The tool 'reunion_list_cantons' is defined via server.tool(). The handler function (lines 136-155) calls client.getRecords with DATASET_CANTONS ('cantons-millesime-france'), maps results extracting fields like can_code, can_name, can_current_code, can_type, dep_name, reg_name, can_burcentral, and year, and returns JSON with total_cantons and cantons array.
    server.tool(
      'reunion_list_cantons',
      'List the electoral cantons of La Réunion (used for departmental elections, "élections cantonales/départementales"). Each canton elects a binôme (2 conseillers départementaux). Returns canton code, name, current code (handles redistricting), type, department, region, central polling-bureau, year reference. Useful for electoral analysis, conseil départemental research.',
      {
        limit: z.number().int().min(1).max(100).default(50).describe('Max cantons to return (1-100, default 50)'),
      },
      async ({ limit }) => {
        try {
          const data = await client.getRecords<RecordObject>(DATASET_CANTONS, { limit });
          return jsonResult({
            total_cantons: data.total_count,
            cantons: data.results.map((row) => ({
              code: pickString(row, ['can_code']),
              name: pickString(row, ['can_name']),
              current_code: pickString(row, ['can_current_code']),
              type: pickString(row, ['can_type']),
              department: pickString(row, ['dep_name']),
              region: pickString(row, ['reg_name']),
              central_bureau: pickString(row, ['can_burcentral']),
              year: pickString(row, ['year']),
            })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to list cantons');
        }
      }
    );
  • Input schema for 'reunion_list_cantons' — accepts a single optional 'limit' parameter (integer, 1-100, default 50) validated with Zod.
    {
      limit: z.number().int().min(1).max(100).default(50).describe('Max cantons to return (1-100, default 50)'),
    },
  • Constant DATASET_CANTONS = 'cantons-millesime-france' is the dataset identifier used by the handler to query the OpenDataSoft API.
    const DATASET_CANTONS = 'cantons-millesime-france';
  • The function registerGeographyTools is exported and called from src/modules/index.ts line 43, which registers this tool (and others) with the MCP server.
    export function registerGeographyTools(server: McpServer): void {
Behavior3/5

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

No annotations provided, so description carries full burden. It correctly implies read-only behavior by saying 'List' and mentions redistricting handling, but lacks explicit statements about side effects or requirements. For a list tool, this is adequate but not outstanding.

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 concise with a few sentences, though it includes some redundant mentions (e.g., 'electoral cantons'). It is front-loaded with purpose and key details, making it easy to scan.

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 single parameter with full schema coverage and the description listing all returned fields, the tool is well-documented. No additional context is needed for effective usage.

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?

The only parameter (limit) is fully described in the schema (min, max, default). The description does not add additional semantic meaning beyond what the schema already provides, hence baseline score of 3.

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 electoral cantons of La Réunion, explains their electoral purpose, and enumerates returned fields. It uniquely identifies the tool among siblings, as no other tool lists cantons.

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?

Description provides context for usage (electoral analysis, conseil départemental research) and implicitly indicates when to use it. While it doesn't explicitly exclude alternatives, siblings are distinct enough that this is not needed.

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