Skip to main content
Glama
Hug0x0

mcp-reunion

reunion_search_sirene_establishments

Search the SIRENE national business registry for establishments located in La Réunion. Find SIRET, legal name, address, activity code, and administrative status.

Instructions

Search the SIRENE v3 national business registry, restricted to establishments located in La Réunion. Each establishment has a 14-digit SIRET (= 9-digit SIREN of the legal entity + 5-digit NIC). Returns SIREN/SIRET, denomination, usual name, brand, head-office flag, administrative state (active/closed), creation date, NAF activity code, workforce bracket, full address, postal code, commune, legal form, ESS (économie sociale et solidaire) status. Source: INSEE Sirene via data.regionreunion.com.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoFree-text search across denomination, usual name, brand, address, activity
sirenNoExact 9-digit SIREN of the legal entity (unité légale)
siretNoExact 14-digit SIRET of the establishment
communeNoCommune name prefix match (e.g. "Saint-Denis")
nafNoNAF/APE activity code prefix match. Examples: "47" for retail, "47.11" for hypermarkets, "56.10A" for traditional restaurants, "62" for IT
limitNoMax establishments to return (1-100, default 25)

Implementation Reference

  • The async handler function that executes the tool logic: builds ODSQL where clause from optional filters (query, siren, siret, commune, naf, limit), calls client.getRecords on the 'base-sirene-v3-lareunion' dataset, and maps results to a structured response with establishment fields (SIREN, SIRET, denomination, usual_name, brand, head_office flag, state, creation_date, activity_code, workforce_bracket, address, postal_code, commune, legal_form, ESS status).
    async ({ query, siren, siret, commune, naf, limit }) => {
      try {
        const data = await client.getRecords<RecordObject>(DATASET_SIRENE, {
          where: buildWhere([
            query ? `search(${quote(query)})` : undefined,
            siren ? `siren = ${quote(siren)}` : undefined,
            siret ? `siret = ${quote(siret)}` : undefined,
            commune ? `libellecommuneetablissement LIKE ${quote(`${commune}%`)}` : undefined,
            naf ? `activiteprincipaleetablissement LIKE ${quote(`${naf}%`)}` : undefined,
          ]),
          limit,
        });
        return jsonResult({
          total_establishments: data.total_count,
          establishments: data.results.map((row) => ({
            siren: pickString(row, ['siren']),
            siret: pickString(row, ['siret']),
            denomination: pickString(row, ['denominationunitelegale']),
            usual_name: pickString(row, ['denominationusuelleetablissement']),
            brand: pickString(row, ['enseigne1etablissement']),
            is_head_office: pickString(row, ['etablissementsiege']),
            state: pickString(row, ['etatadministratifetablissement']),
            creation_date: pickString(row, ['datecreationetablissement']),
            activity_code: pickString(row, ['activiteprincipaleetablissement']),
            workforce_bracket: pickString(row, ['trancheeffectifsetablissement']),
            workforce_year: pickString(row, ['anneeeffectifsetablissement']),
            address: pickString(row, ['adresseetablissement']),
            postal_code: pickString(row, ['codepostaletablissement']),
            commune: pickString(row, ['libellecommuneetablissement']),
            legal_form: pickString(row, ['categoriejuridiqueunitelegale']),
            ess: pickString(row, ['economiesocialesolidaireunitelegale']),
          })),
        });
      } catch (error) {
        return errorResult(error instanceof Error ? error.message : 'Failed to search SIRENE');
      }
    }
  • Zod schema definitions for input validation: query (optional string), siren (optional 9-digit string), siret (optional 14-digit string), commune (optional string), naf (optional string), limit (optional int 1-100, default 25).
    {
      query: z.string().optional().describe('Free-text search across denomination, usual name, brand, address, activity'),
      siren: z.string().optional().describe('Exact 9-digit SIREN of the legal entity (unité légale)'),
      siret: z.string().optional().describe('Exact 14-digit SIRET of the establishment'),
      commune: z.string().optional().describe('Commune name prefix match (e.g. "Saint-Denis")'),
      naf: z.string().optional().describe('NAF/APE activity code prefix match. Examples: "47" for retail, "47.11" for hypermarkets, "56.10A" for traditional restaurants, "62" for IT'),
      limit: z.number().int().min(1).max(100).default(25).describe('Max establishments to return (1-100, default 25)'),
    },
  • The tool is registered via server.tool('reunion_search_sirene_establishments', ...) inside registerEconomyTools(server) function, which is called from registerAllTools in src/modules/index.ts, which is called from main() in src/index.ts.
    server.tool(
      'reunion_search_sirene_establishments',
      'Search the SIRENE v3 national business registry, restricted to establishments located in La Réunion. Each establishment has a 14-digit SIRET (= 9-digit SIREN of the legal entity + 5-digit NIC). Returns SIREN/SIRET, denomination, usual name, brand, head-office flag, administrative state (active/closed), creation date, NAF activity code, workforce bracket, full address, postal code, commune, legal form, ESS (économie sociale et solidaire) status. Source: INSEE Sirene via data.regionreunion.com.',
      {
        query: z.string().optional().describe('Free-text search across denomination, usual name, brand, address, activity'),
        siren: z.string().optional().describe('Exact 9-digit SIREN of the legal entity (unité légale)'),
        siret: z.string().optional().describe('Exact 14-digit SIRET of the establishment'),
        commune: z.string().optional().describe('Commune name prefix match (e.g. "Saint-Denis")'),
        naf: z.string().optional().describe('NAF/APE activity code prefix match. Examples: "47" for retail, "47.11" for hypermarkets, "56.10A" for traditional restaurants, "62" for IT'),
        limit: z.number().int().min(1).max(100).default(25).describe('Max establishments to return (1-100, default 25)'),
      },
      async ({ query, siren, siret, commune, naf, limit }) => {
        try {
          const data = await client.getRecords<RecordObject>(DATASET_SIRENE, {
            where: buildWhere([
              query ? `search(${quote(query)})` : undefined,
              siren ? `siren = ${quote(siren)}` : undefined,
              siret ? `siret = ${quote(siret)}` : undefined,
              commune ? `libellecommuneetablissement LIKE ${quote(`${commune}%`)}` : undefined,
              naf ? `activiteprincipaleetablissement LIKE ${quote(`${naf}%`)}` : undefined,
            ]),
            limit,
          });
          return jsonResult({
            total_establishments: data.total_count,
            establishments: data.results.map((row) => ({
              siren: pickString(row, ['siren']),
              siret: pickString(row, ['siret']),
              denomination: pickString(row, ['denominationunitelegale']),
              usual_name: pickString(row, ['denominationusuelleetablissement']),
              brand: pickString(row, ['enseigne1etablissement']),
              is_head_office: pickString(row, ['etablissementsiege']),
              state: pickString(row, ['etatadministratifetablissement']),
              creation_date: pickString(row, ['datecreationetablissement']),
              activity_code: pickString(row, ['activiteprincipaleetablissement']),
              workforce_bracket: pickString(row, ['trancheeffectifsetablissement']),
              workforce_year: pickString(row, ['anneeeffectifsetablissement']),
              address: pickString(row, ['adresseetablissement']),
              postal_code: pickString(row, ['codepostaletablissement']),
              commune: pickString(row, ['libellecommuneetablissement']),
              legal_form: pickString(row, ['categoriejuridiqueunitelegale']),
              ess: pickString(row, ['economiesocialesolidaireunitelegale']),
            })),
          });
        } catch (error) {
          return errorResult(error instanceof Error ? error.message : 'Failed to search SIRENE');
        }
      }
    );
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 data source (INSEE Sirene via data.regionreunion.com), the restricted scope, and the fields returned. However, it doesn't mention pagination behavior, sorting, or rate limits, which would be helpful for an agent.

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 a single, information-dense paragraph with no wasted words. It front-loads the main action, then details the fields and source. Every sentence adds value.

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 has no output schema and 6 parameters, the description covers the main purpose, restriction, and return fields. It could mention pagination limits or that query is free-text, but overall it is fairly complete for an agent to understand the tool's capabilities.

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 input schema provides descriptions for all 6 parameters (schema_coverage=100%), so the baseline is 3. The description adds context about the registry and field list but does not elaborate on parameter usage beyond what the schema already states.

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 SIRENE v3 national business registry, restricted to La Réunion. It explains the SIRET structure and lists all returned fields, providing a specific verb+resource purpose that differentiates it from sibling 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 Guidelines4/5

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

The description explains the geographic restriction to La Réunion and the type of data returned. While it doesn't explicitly state when to use vs alternatives, the context of sibling tools (many other search/get tools) and the specific registry focus make usage clear.

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