Skip to main content
Glama
cmendezs

mcp-facture-electronique-fr

submit_flow

Submit electronic invoices (Factur-X, UBL, CII), e-reporting, or lifecycle status to the French Approved Platform. Requires user confirmation; returns flow ID for tracking.

Instructions

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

Scope: Compatible Solution (CS) mode, no payload validation. See README "Scope" section.

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_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_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.
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).
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.
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=...).
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.
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 present, but description covers async submission, error cases (base64, AP rejection), B2B recipient requirements, success response fields, and confirmation token flow.

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?

Well-structured with clear sections (HUMAN-IN-THE-LOOP, BEHAVIOR, RESPONSE, USAGE GUIDELINES). Every sentence adds value; no fluff.

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 7 params, 100% schema coverage, and presence of output schema, description covers all necessary context: prerequisites, async behavior, error handling, alternative tools, and human-in-the-loop process.

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

Parameters4/5

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

Input schema has 100% coverage, but description adds usage context (e.g., confirmation_token flow, tracking_id recommendation) beyond schema explanations.

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 it submits invoices, e-reportings, or lifecycle statuses, specifies scope (CS, no validation), and distinguishes from sibling tools like submit_lifecycle_status and healthcheck_flow.

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 on when to use (B2B pre-check with get_directory_line, setting tracking_id, human-in-the-loop flow) and when not to (prefer submit_lifecycle_status for lifecycle statuses, call healthcheck_flow before batch).

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