Skip to main content
Glama
cmendezs

mcp-facture-electronique-fr

get_company_by_siren

Look up a French company in the PPF directory using its 9-digit SIREN number to retrieve legal unit details including company name, administrative status, Approved Platform, and registration dates.

Instructions

Look up a company in the PPF directory by its SIREN number. Returns the full legal unit information: company name, administrative status, associated Approved Platform, and registration dates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sirenYesCompany SIREN number (9 digits, no spaces). Example: '123456789'. Returns the full legal unit information in the PPF directory, including registration status and Approved Platform.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for get_company_by_siren. An async function decorated with @mcp.tool() that takes a required 'siren' parameter (9 digits), obtains a DirectoryClient via get_directory_client(), and delegates to client.get_company_by_siren(siren=siren).
    async def get_company_by_siren(
        siren: Annotated[
            str,
            Field(
                description=(
                    "Company SIREN number (9 digits, no spaces). "
                    "Example: '123456789'. "
                    "Returns the full legal unit information in the PPF directory, "
                    "including registration status and Approved Platform."
                )
            ),
        ],
    ) -> dict:
        """
        Look up a company in the PPF directory by its SIREN number.
        Returns the full legal unit information: company name,
        administrative status, associated Approved Platform, and registration dates.
        """
        client = get_directory_client()
        return await client.get_company_by_siren(siren=siren)
  • Input schema: the 'siren' parameter is defined as an Annotated[str, Field(...)] with a description explaining it's a 9-digit SIREN number. It's a required parameter (no default). The return type is dict.
    async def get_company_by_siren(
        siren: Annotated[
            str,
            Field(
                description=(
                    "Company SIREN number (9 digits, no spaces). "
                    "Example: '123456789'. "
                    "Returns the full legal unit information in the PPF directory, "
                    "including registration status and Approved Platform."
                )
            ),
        ],
  • Registration: The function is registered as an MCP tool via the @mcp.tool() decorator at line 121, inside the register_directory_tools(mcp) function. This function is called from server.py line 64.
    @mcp.tool()
    async def get_company_by_siren(
        siren: Annotated[
            str,
            Field(
                description=(
                    "Company SIREN number (9 digits, no spaces). "
                    "Example: '123456789'. "
                    "Returns the full legal unit information in the PPF directory, "
                    "including registration status and Approved Platform."
                )
            ),
        ],
    ) -> dict:
        """
        Look up a company in the PPF directory by its SIREN number.
        Returns the full legal unit information: company name,
        administrative status, associated Approved Platform, and registration dates.
        """
        client = get_directory_client()
        return await client.get_company_by_siren(siren=siren)
  • Client-side helper method get_company_by_siren in DirectoryClient. Makes a GET request to /v1/siren/code-insee:{siren} and returns the JSON response. This is the actual HTTP call that the tool handler delegates to.
    async def get_company_by_siren(self, siren: str) -> dict[str, Any]:
        """GET /v1/siren/code-insee:{siren} — Look up a legal unit by SIREN."""
        response = await self._request("GET", f"/v1/siren/code-insee:{siren}")
        return response.json()
Behavior2/5

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

No annotations are provided, so the description bears full responsibility. It only states the return value without disclosing any behavioral traits such as read-only nature, potential errors, or rate limits. For a lookup tool, stating it is non-destructive would improve transparency.

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?

Two sentences efficiently convey purpose and output, with no wasted words. Front-loaded with the key verb and resource.

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?

For a simple single-parameter lookup with an output schema, the description sufficiently covers what the tool does and returns. Minor gap: it could mention the 9-digit format for SIREN (though schema does). Overall adequate.

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 covers 100% of parameters, and the description adds no new information beyond what the schema's 'siren' parameter description already provides. Baseline score of 3 is appropriate.

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?

Description clearly states the action ('Look up a company') and the resource ('by its SIREN number in the PPF directory'), specifying what is returned. It implicitly differentiates from sibling tools like get_establishment_by_siret (by SIRET) and search_company (by name).

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 when a SIREN number is available but provides no explicit guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites.

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/cmendezs/mcp-facture-electronique-fr'

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