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
| Name | Required | Description | Default |
|---|---|---|---|
| siren | Yes | 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools/directory_tools.py:122-141 (handler)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) - tools/directory_tools.py:122-133 (schema)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." ) ), ], - tools/directory_tools.py:121-141 (registration)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) - clients/directory_client.py:70-73 (helper)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()