Skip to main content
Glama
Hug0x0

mcp-reunion

reunion_search_public_facilities

Search the official inventory of public facilities in La Réunion for shops, education, health, transport, and more. Use for accessibility analysis, market studies, or urban planning.

Instructions

Search the INSEE Base Permanente des Équipements (BPE) for La Réunion. BPE is the reference inventory of facilities providing services to the public: shops (commerces), education, health, social services, transport, sports, tourism, public administration. Each row is one geocoded equipment with INSEE category code. Returns equipment name and code, category, commune, EPCI, year, geocoding quality. Use this for accessibility/coverage analysis, market studies, urban planning.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoEquipment category prefix match. Examples: "Services aux particuliers", "Commerce", "Enseignement", "Santé", "Sports, loisirs et culture", "Transports et tourisme"
communeNoCommune name prefix match
equipment_nameNoFree-text search on the equipment name
limitNoMax equipments to return (1-500, default 50)

Implementation Reference

  • Handler function for 'reunion_search_public_facilities' tool. Executes the search logic: builds a WHERE clause from optional filters (category, commune, equipment_name), queries the 'base-permanente-des-equipements-geolocalisee-la-reunion' dataset via the ReunionClient, maps results to a structured response (name, code, category, commune, epci, year, geo_quality), and returns JSON or an error.
    server.tool(
      'reunion_search_public_facilities',
      'Search the INSEE Base Permanente des Équipements (BPE) for La Réunion. BPE is the reference inventory of facilities providing services to the public: shops (commerces), education, health, social services, transport, sports, tourism, public administration. Each row is one geocoded equipment with INSEE category code. Returns equipment name and code, category, commune, EPCI, year, geocoding quality. Use this for accessibility/coverage analysis, market studies, urban planning.',
      {
        category: z.string().optional().describe('Equipment category prefix match. Examples: "Services aux particuliers", "Commerce", "Enseignement", "Santé", "Sports, loisirs et culture", "Transports et tourisme"'),
        commune: z.string().optional().describe('Commune name prefix match'),
        equipment_name: z.string().optional().describe('Free-text search on the equipment name'),
        limit: z.number().int().min(1).max(500).default(50).describe('Max equipments to return (1-500, default 50)'),
      },
      async ({ category, commune, equipment_name, limit }) => {
        try {
          const data = await client.getRecords<RecordObject>(DATASET_BPE, {
            where: buildWhere([
              category ? `category LIKE ${quote(`${category}%`)}` : undefined,
              commune ? `com_arm_name LIKE ${quote(`${commune}%`)}` : undefined,
              equipment_name ? `search(${quote(equipment_name)})` : undefined,
            ]),
            limit,
          });
    
          return jsonResult({
            total_equipments: data.total_count,
            equipments: data.results.map((row) => ({
              name: pickString(row, ['equipment_name']),
              code: pickString(row, ['equipment_code']),
              category: pickString(row, ['category']),
              commune: pickString(row, ['com_arm_name']),
              epci: pickString(row, ['epci_name']),
              year: pickString(row, ['year']),
              geo_quality: pickString(row, ['geocode_quality']),
            })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to search facilities');
        }
      }
  • Input schema for 'reunion_search_public_facilities'. Defines optional filters: category (string prefix), commune (string prefix), equipment_name (free-text), and limit (integer 1-500, default 50).
    {
      category: z.string().optional().describe('Equipment category prefix match. Examples: "Services aux particuliers", "Commerce", "Enseignement", "Santé", "Sports, loisirs et culture", "Transports et tourisme"'),
      commune: z.string().optional().describe('Commune name prefix match'),
      equipment_name: z.string().optional().describe('Free-text search on the equipment name'),
      limit: z.number().int().min(1).max(500).default(50).describe('Max equipments to return (1-500, default 50)'),
    },
  • Registration of 'reunion_search_public_facilities' via server.tool() within registerFacilityTools(). The function registerFacilityTools is called from src/modules/index.ts (line 42) which is called from src/index.ts (line 22).
    export function registerFacilityTools(server: McpServer): void {
      server.tool(
        'reunion_search_public_facilities',
        'Search the INSEE Base Permanente des Équipements (BPE) for La Réunion. BPE is the reference inventory of facilities providing services to the public: shops (commerces), education, health, social services, transport, sports, tourism, public administration. Each row is one geocoded equipment with INSEE category code. Returns equipment name and code, category, commune, EPCI, year, geocoding quality. Use this for accessibility/coverage analysis, market studies, urban planning.',
        {
          category: z.string().optional().describe('Equipment category prefix match. Examples: "Services aux particuliers", "Commerce", "Enseignement", "Santé", "Sports, loisirs et culture", "Transports et tourisme"'),
          commune: z.string().optional().describe('Commune name prefix match'),
          equipment_name: z.string().optional().describe('Free-text search on the equipment name'),
          limit: z.number().int().min(1).max(500).default(50).describe('Max equipments to return (1-500, default 50)'),
        },
        async ({ category, commune, equipment_name, limit }) => {
          try {
            const data = await client.getRecords<RecordObject>(DATASET_BPE, {
              where: buildWhere([
                category ? `category LIKE ${quote(`${category}%`)}` : undefined,
                commune ? `com_arm_name LIKE ${quote(`${commune}%`)}` : undefined,
                equipment_name ? `search(${quote(equipment_name)})` : undefined,
              ]),
              limit,
            });
    
            return jsonResult({
              total_equipments: data.total_count,
              equipments: data.results.map((row) => ({
                name: pickString(row, ['equipment_name']),
                code: pickString(row, ['equipment_code']),
                category: pickString(row, ['category']),
                commune: pickString(row, ['com_arm_name']),
                epci: pickString(row, ['epci_name']),
                year: pickString(row, ['year']),
                geo_quality: pickString(row, ['geocode_quality']),
              })),
            });
          } catch (error) {
            return errorResult(error instanceof Error ? error.message : 'Failed to search facilities');
          }
        }
      );
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the return fields (equipment name/code, category, commune, EPCI, year, geocoding quality) and explains search behavior (prefix match, free-text). It implies read-only usage but does not explicitly state safety or rates.

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 three sentences, front-loading the function and data source. Every sentence adds value: purpose, categories, return fields, and use cases. No redundancy or fluff.

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?

For a search tool with no output schema, the description covers return fields, parameter behaviors, data source, and use cases. It is fully self-contained and leaves no obvious gaps for the agent to infer.

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 is 3. The description adds context about the data source (BPE) and prefix matching behavior, but each parameter's meaning is already explained in the schema. The description does not significantly enhance parameter understanding beyond what is 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 tool searches the INSEE BPE for La Réunion, listing specific categories. It uses a specific verb ('Search') and resource, distinguishing it from sibling search tools like reunion_search_sport_facilities.

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 provides explicit use cases: 'accessibility/coverage analysis, market studies, urban planning.' It does not specify when not to use or mention alternatives, but the listed use cases give clear context for when this tool is appropriate.

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