Skip to main content
Glama
cmendezs

mcp-facture-electronique-fr

by cmendezs

validate_facturx

Ensure Factur-X CII XML meets profile-specific Schematron business rules, returning errors and warnings to avoid rejected submissions.

Instructions

Validate a Factur-X CII XML document against its profile's Schematron ruleset.

Scope: Schematron (SVRL) business-rule validation only, no XSD structural check. Returns is_valid, errors, and warnings (rule_id, location, text). Use this before embedding the XML into a PDF/A-3 or submitting via submit_flow.

Requires the optional saxonche extra (FR-XSLT2-1, resolved in mcp-einvoicing-core 1.14.0): the bundled Factur-X 1.09.2 Schematron stylesheets require XSLT 2.0, which lxml/libxslt (XSLT 1.0 only) cannot compile. Install with pip install mcp-facture-electronique-fr[xslt2]. If it is missing, this tool returns level="unavailable" with is_valid=None instead of raising.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileYesFactur-X profile to validate against. One of: MINIMUM, BASICWL, BASIC, EN16931, EXTENDED, EXTENDED-CTC-FR. EXTENDED-CTC-FR is validated against the generic EXTENDED ruleset only — AFNOR has not published a CTC-FR-specific Schematron; French-specific rules beyond EXTENDED are not checked.
xml_contentYesFactur-X CII XML content to validate (the embedded XML, not the PDF/A-3).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Discloses the fallback behavior when the optional saxonche extra is missing: returns level='unavailable' with is_valid=None instead of raising. Also states the return structure (is_valid, errors, warnings) which is not in 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 detailed but each sentence adds meaningful information. It could be condensed slightly, but the structure flows logically from purpose to usage to dependency.

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?

Includes scope, return fields, usage guidance, and dependency installation. Complete for a validation tool given the rich parameter descriptions and assumed output schema.

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?

Schema covers both parameters fully (100%), but the description adds nuance: xml_content is the embedded XML (not the PDF) and the profile parameter clarifies the limitation of EXTENDED-CTC-FR. This exceeds baseline value.

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?

Clearly states it validates Factur-X CII XML against Schematron rules, with explicit scope (no XSD). Distinguishes from sibling validate_ereporting_xml by format and target.

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?

Explicitly says to use before embedding into PDF/A-3 or submitting via submit_flow. Also clarifies it's only Schematron, implying when not to use (e.g., for structural checks).

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