Skip to main content
Glama
cmendezs

mcp-facture-electronique-fr

submit_flow

Submit electronic invoices, e-reporting, or lifecycle statuses to the Approved Platform with a two-step confirmation process for user approval.

Instructions

Submit an electronic invoice, e-reporting, or lifecycle status to the Approved Platform.

This is the primary action for sending B2B invoices (Factur-X, UBL, CII), B2BInt/B2C e-reportings, or CDAR lifecycle status messages.

HUMAN-IN-THE-LOOP: This tool requires explicit user confirmation. Call without confirmation_token first; show the returned summary to the user; then call again with the provided token to execute the submission.

BEHAVIOR:

  • Submission is asynchronous: the AP returns a flowId and an initial status (typically 'Deposited'), not the final delivery status. Poll get_flow(flow_id) or search_flows to track processing.

  • Returns an error dict (with 'error' key) if the base64 encoding is invalid.

  • The AP may reject the flow synchronously (e.g. malformed XML, unknown recipient, quota exceeded); in that case the response contains an error code and message.

  • If processing_rule is B2B, the recipient must be registered in the PPF directory with an active directory line; verify with get_directory_line before submitting.

RESPONSE on success: includes flowId (AP-assigned identifier), trackingId (echoed back), status (initial processing status), and submittedAt timestamp.

USAGE GUIDELINES:

  • Always call get_directory_line (or search_directory_line) first to confirm the recipient is reachable and to identify their Approved Platform before submitting a B2B invoice.

  • Set a meaningful tracking_id (invoice number or UUID) to simplify later retrieval via search_flows.

  • After submission, use get_flow(flow_id, doc_type='Metadata') to monitor the flow status.

  • For lifecycle statuses on received invoices (Refused, Approved, etc.), prefer submit_lifecycle_status which provides structured status fields and handles mandatory PPF transmissions.

  • Call healthcheck_flow before a batch submission to confirm the AP is available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_base64YesFile content encoded in base64. Accepted formats: Factur-X (PDF/A-3 with embedded XML), UBL 2.1 (XML), UN/CEFACT CII D22B (XML). Maximum file size is defined by the Approved Platform (typically a few MB).
file_nameYesFile name with extension (e.g. 'invoice_2024_001.xml', 'invoice_2024_001.pdf'). The AP uses the extension to detect the format when flow_syntax is ambiguous.
flow_syntaxYesSyntax/format of the submitted file (required). Common values: FacturX — PDF/A-3 with embedded Factur-X XML; UBL — UBL 2.1 XML invoice or credit note; CII — UN/CEFACT CII D22B XML invoice; CDAR — XML lifecycle status document; EReporting — B2B or B2C e-reporting flow.
processing_ruleYesProcessing rule that determines routing and PPF transmission obligations. B2B: domestic invoice between French VAT-registered entities (routed + reported to PPF). B2BInt: international invoice or cross-border e-reporting. B2C: invoice to a non-taxable entity or B2C e-reporting. B2G: invoice to a public-sector entity (v1.2.0). B2GInt: international invoice to a public-sector entity (v1.2.0). B2GOutOfScope: public-sector transaction outside reform scope (v1.2.0). OutOfScope: transaction outside the reform scope (archived only). ArchiveOnly: archiving without routing to recipient. NotApplicable: used for lifecycle status (CDAR) flows.
flow_typeYesBusiness type of the submitted flow. Common values: Invoice, CreditNote, DebitNote, EReportingB2B, EReportingB2C, LifecycleStatus. Refer to your Approved Platform's documentation for the exhaustive list.
tracking_idNoSender-assigned tracking identifier (free-form, maxLength 36). Recommended: use the invoice number or an internal UUID. Allows retrieving this specific flow later via search_flows(tracking_id=...).
confirmation_tokenNoConfirmation token returned by a previous call to this tool. Required to actually submit; omit on the first call to receive a summary and token for user approval.

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 behavioral disclosure burden. It thoroughly explains the human-in-the-loop confirmation, asynchronous nature (returns flowId, not final status), error handling for invalid base64 and synchronous AP rejections, and prerequisites like PPF registration for B2B. It also describes the success response structure.

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-organized with clear sections (HUMAN-IN-THE-LOOP, BEHAVIOR, USAGE GUIDELINES) and front-loaded purpose. While it is lengthy, every sentence adds necessary information for correct usage. Minor redundancy in the opening line could be trimmed, but overall it is appropriately concise for a complex tool.

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 (7 parameters, asynchronous submission, human-in-the-loop, multiple formats, error handling), the description is exceptionally complete. It covers prerequisites, monitoring, error scenarios, and ties into sibling tools (get_directory_line, get_flow, healthcheck_flow, submit_lifecycle_status). No gaps are apparent.

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?

The input schema has 100% description coverage, so the baseline is 3, but the description adds significant value beyond the schema. It explains the confirmation_token workflow, the purpose of tracking_id for retrieval, and the role of processing_rule in routing. It also contextualizes flow_syntax and flow_type choices.

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's purpose: 'Submit an electronic invoice, e-reporting, or lifecycle status to the Approved Platform.' It specifies supported formats (Factur-X, UBL, CII, CDAR) and distinguishes from sibling tools like submit_lifecycle_status by noting 'prefer submit_lifecycle_status for lifecycle statuses.'

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?

The description provides explicit when-to-use and when-not-to-use guidance: it is the primary action for sending B2B invoices, e-reportings, or lifecycle status. It advises calling get_directory_line first, setting a tracking_id, using get_flow for monitoring, and preferring submit_lifecycle_status for lifecycle statuses. It also explains the two-call confirmation workflow.

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