Skip to main content
Glama
Hug0x0

mcp-reunion

reunion_list_gen2024_schools

Retrieve schools in La Réunion awarded the 'Génération 2024' label for sport-oriented projects. Filter by commune, type, and limit results to get school details including enrollment and special programs.

Instructions

List schools in La Réunion that received the "Génération 2024" label — a Ministry of Education + Sport designation tied to the Paris 2024 Olympics, awarded to schools that develop sport-oriented projects (extra hours, partnerships with clubs, Olympic Day events). Returns school name, UAI, type (école/collège/lycée), sector, commune, total enrollment, priority-zone status, ULIS/SEGPA/sport-section flags, lycée-des-métiers flag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
communeNoCommune name prefix match
typeNoEstablishment type prefix match. Examples: "Ecole", "Collège", "Lycée"
limitNoMax schools to return (1-300, default 100)

Implementation Reference

  • Handler for the 'reunion_list_gen2024_schools' tool. Fetches schools labeled 'Génération 2024' from the OpenDataSoft dataset 'etablissements-labellises-generation-2024-a-la-reunion'. Accepts optional filters (commune, type, limit) and returns school details including name, UAI, type, sector, commune, enrollment, priority zone status, ULIS/SEGPA/sport-section flags, and lycée-des-métiers flag.
    server.tool(
      'reunion_list_gen2024_schools',
      'List schools in La Réunion that received the "Génération 2024" label — a Ministry of Education + Sport designation tied to the Paris 2024 Olympics, awarded to schools that develop sport-oriented projects (extra hours, partnerships with clubs, Olympic Day events). Returns school name, UAI, type (école/collège/lycée), sector, commune, total enrollment, priority-zone status, ULIS/SEGPA/sport-section flags, lycée-des-métiers flag.',
      {
        commune: z.string().optional().describe('Commune name prefix match'),
        type: z.string().optional().describe('Establishment type prefix match. Examples: "Ecole", "Collège", "Lycée"'),
        limit: z.number().int().min(1).max(300).default(100).describe('Max schools to return (1-300, default 100)'),
      },
      async ({ commune, type, limit }) => {
        try {
          const data = await client.getRecords<RecordObject>(DATASET_G2024, {
            where: buildWhere([
              commune ? `commune LIKE ${quote(`${commune}%`)}` : undefined,
              type ? `type LIKE ${quote(`${type}%`)}` : undefined,
            ]),
            limit,
          });
          return jsonResult({
            total_schools: data.total_count,
            schools: data.results.map((row) => ({
              name: pickString(row, ['nom_etablissement']),
              uai: pickString(row, ['uai']),
              type: pickString(row, ['type']),
              sector: pickString(row, ['statut_public_prive']),
              commune: pickString(row, ['commune']),
              enrollment: pickNumber(row, ['effectif']),
              priority_zone: pickString(row, ['educ_prio']),
              has_ulis: pickNumber(row, ['ulis']) === 1,
              has_segpa: pickNumber(row, ['segpa']) === 1,
              has_sport_section: pickNumber(row, ['section_sport']) === 1,
              is_lycee_des_metiers: pickNumber(row, ['lycee_des_metiers']) === 1,
            })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to fetch G2024 schools');
        }
      }
    );
  • Zod schema for the tool's input validation: commune (optional string), type (optional string), limit (int 1-300, default 100).
    {
      commune: z.string().optional().describe('Commune name prefix match'),
      type: z.string().optional().describe('Establishment type prefix match. Examples: "Ecole", "Collège", "Lycée"'),
      limit: z.number().int().min(1).max(300).default(100).describe('Max schools to return (1-300, default 100)'),
    },
  • Tool is registered via server.tool('reunion_list_gen2024_schools', ...) inside registerEducationTools(), which is called from src/modules/index.ts (line 39) and src/index.ts (line 22).
    server.tool(
      'reunion_list_gen2024_schools',
      'List schools in La Réunion that received the "Génération 2024" label — a Ministry of Education + Sport designation tied to the Paris 2024 Olympics, awarded to schools that develop sport-oriented projects (extra hours, partnerships with clubs, Olympic Day events). Returns school name, UAI, type (école/collège/lycée), sector, commune, total enrollment, priority-zone status, ULIS/SEGPA/sport-section flags, lycée-des-métiers flag.',
      {
        commune: z.string().optional().describe('Commune name prefix match'),
        type: z.string().optional().describe('Establishment type prefix match. Examples: "Ecole", "Collège", "Lycée"'),
        limit: z.number().int().min(1).max(300).default(100).describe('Max schools to return (1-300, default 100)'),
      },
      async ({ commune, type, limit }) => {
        try {
          const data = await client.getRecords<RecordObject>(DATASET_G2024, {
            where: buildWhere([
              commune ? `commune LIKE ${quote(`${commune}%`)}` : undefined,
              type ? `type LIKE ${quote(`${type}%`)}` : undefined,
            ]),
            limit,
          });
          return jsonResult({
            total_schools: data.total_count,
            schools: data.results.map((row) => ({
              name: pickString(row, ['nom_etablissement']),
              uai: pickString(row, ['uai']),
              type: pickString(row, ['type']),
              sector: pickString(row, ['statut_public_prive']),
              commune: pickString(row, ['commune']),
              enrollment: pickNumber(row, ['effectif']),
              priority_zone: pickString(row, ['educ_prio']),
              has_ulis: pickNumber(row, ['ulis']) === 1,
              has_segpa: pickNumber(row, ['segpa']) === 1,
              has_sport_section: pickNumber(row, ['section_sport']) === 1,
              is_lycee_des_metiers: pickNumber(row, ['lycee_des_metiers']) === 1,
            })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to fetch G2024 schools');
        }
      }
    );
  • buildWhere helper used to construct the ODSQL WHERE clause from optional filter conditions.
    export function buildWhere(
      conditions: Array<string | undefined | null | false>
    ): string | undefined {
      const valid = conditions.filter((condition): condition is string => Boolean(condition));
      return valid.length > 0 ? valid.join(' AND ') : undefined;
    }
  • pickValue helper used to extract values from API response records.
    export function pickValue<T = unknown>(
      record: RecordObject,
      candidates: string[]
    ): T | undefined {
      for (const candidate of candidates) {
        if (candidate in record) {
          const value = record[candidate];
          if (value !== undefined && value !== null) {
            // OpenDataSoft v2.1 wraps some text fields as single-element arrays
            // (e.g. com_name → ["Saint-Denis"]). Unwrap so downstream pickers
            // see the scalar they expect.
            if (Array.isArray(value) && value.length === 1) {
              return value[0] as T;
            }
            return value as T;
          }
        }
      }
      return undefined;
    }
Behavior4/5

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

Despite no annotations, the description discloses the return fields and the special label context. It does not detail filtering behavior beyond schema hints or mention rate limits, but adequately covers core behavior.

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 one long sentence but front-loaded with the core purpose. It provides necessary context without extraneous words, though could be slightly more condensed.

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?

The description lists return fields and explains the label, covering key aspects for a filtered list tool. It lacks mention of ordering or error handling, but is complete enough given the tool's simplicity.

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 coverage is 100%, and the description does not add new parameter details beyond what the schema already provides (e.g., commune and type prefix match, limit defaults).

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 schools in La Réunion with the 'Génération 2024' label, explains the label's significance, and lists return fields. This distinguishes it from generic school search tools.

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 implies usage for finding specific labeled schools but does not explicitly compare to alternatives like reunion_search_schools or state when not to use it.

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