Skip to main content
Glama
cmendezs

mcp-facture-electronique-fr

create_routing_code

Create a routing code for a SIRET to route incoming invoices to specific departments. Requires active establishment and unique code value.

Instructions

Create a new routing code for a SIRET in the PPF directory.

Routing codes let a recipient company route incoming invoices to specific departments or services. Once created, the code can be referenced in a directory line (create_directory_line) and communicated to senders to use in invoice addressing.

BEHAVIOR:

  • Returns the created routing code object including its instanceId.

  • Fails if the SIRET is not registered or not Active in the PPF directory.

  • Fails if a routing code with the same value already exists for this SIRET (duplicate check).

  • The routing_code value is case-sensitive and must be unique per SIRET.

RESPONSE: includes instanceId (required for update/delete), siret, siren, routingCode, label, createdAt.

USAGE GUIDELINES:

  • Call get_establishment_by_siret first to verify the SIRET is Active before creating a routing code.

  • After creating, call create_directory_line with routing_code set to register the receiving address.

  • If a routing code already exists (duplicate error), use search_routing_code to retrieve its instanceId, then update it with update_routing_code if needed.

  • Routing codes are optional; omit them if the company routes all invoices to a single SIRET address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siretYesEstablishment SIRET to associate this routing code with (14 digits). The SIRET must already be registered and Active in the PPF directory.
routing_codeYesRouting code value to create (free-form string, e.g. 'PURCHASING-DEPT', 'PARIS-OFFICE'). This exact value will appear in invoicing addresses and must be communicated to senders.
labelNoHuman-readable label for the routing code (e.g. 'Purchasing department - HQ'). Optional but recommended for clarity when multiple codes exist.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full burden. It thoroughly discloses failure conditions (SIRET not registered/Active, duplicate code), case-sensitivity, uniqueness per SIRET, response fields including instanceId, and how the code is used in directory lines. This is highly transparent for a mutation tool with no annotations.

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 well-structured with clear sections (BEHAVIOR, RESPONSE, USAGE GUIDELINES) and every sentence adds value. It is slightly long but appropriate given the tool's complexity and lack of annotations. Could be shortened slightly without losing meaning.

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?

Given the tool's complexity (3 parameters, output schema present, 16 sibling tools), the description is fully complete. It covers preconditions, postconditions, dependencies on other tools, error handling, and response structure. The output schema documents return types, while description adds behavioral and workflow context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers 100% of parameters with descriptions, but the description adds significant context: explains that routing_code value appears in invoicing addresses, label is optional but recommended for clarity, and that siret must be Active. This goes beyond the schema's field-level docs.

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 creates a routing code for a SIRET in the PPF directory. It differentiates from sibling tools like create_directory_line (which uses routing codes) and update_routing_code (modifies existing). The verb 'create' and resource 'routing code' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Provides explicit guidance: call get_establishment_by_siret first to verify Active status, then create; follow with create_directory_line to register address. Also covers duplicate handling (search_routing_code, update_routing_code) and states when routing codes are optional. This is exemplary when-to-use and when-not-to-use guidance.

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