Skip to main content
Glama
Frihet-io

Frihet MCP Server

by Frihet-io

Validate E-Invoice XML

validate_einvoice_xml
Read-onlyIdempotent

Validate e-invoice XML documents against schema and business rules to catch errors before dispatch. Returns detailed validation errors with severity and location.

Instructions

Validate an e-invoice XML document against the specified format's schema and schematron rules. Returns a list of errors with severity, XPath location, message, and rule ID. Runs KOSIT validator (XRechnung), Mustang (EN16931), XSD, or Schematron depending on format.

Use before dispatch to catch errors early without incurring network transmission costs. A valid=true response means the document passes all schema + business rule checks.

If the validation backend is not deployed for this workspace, returns an honest 'unavailable' response — never a fabricated valid=true. / Valida un documento XML de factura electronica contra el esquema y reglas schematron del formato especificado.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesRaw XML string of the e-invoice document to validate / Contenido XML de la factura electronica
formatYesFormat to validate against. Determines which validator and ruleset to apply. / Formato a validar. Determina el validador y conjunto de reglas a aplicar.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYesWhether the XML passes all validation rules
errorsYesList of validation findings (empty if valid)
validatorYesValidation engine used
durationMsYesValidation duration in milliseconds
Behavior5/5

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

The description adds specific behavioral details beyond annotations: the validators used (KOSIT, Mustang, etc.) and the return format (errors with severity, XPath, message, rule ID). It also clarifies the honesty policy for unavailable backends. Annotations already indicate read-only and idempotent, but the description enriches transparency.

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 efficient and front-loaded with the core purpose. However, it includes bilingual content (English and Spanish) which adds length; while not excessive, it could be streamlined for an AI agent. Overall, it remains concise and well-structured.

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 (2 parameters, output schema exists), the description is fully adequate. It covers the purpose, usage timing, edge cases (unavailable backend), and validation process. With output schema present, return values need no further explanation. No gaps remain.

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?

The input schema has 100% description coverage, so each parameter is already explained. The tool description adds extra context for the 'format' parameter, stating it 'determines which validator and ruleset to apply', which aids understanding beyond the enum list. This incremental value merits a score above the baseline of 3.

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 validates e-invoice XML against schema and schematron rules, specifying the verb 'validate' and resource 'e-invoice XML'. It distinguishes from sibling tools like 'send_einvoice' and 'get_einvoice_status' by focusing on pre-dispatch validation, making the purpose unambiguous.

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

Usage Guidelines4/5

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

The description explicitly advises using the tool 'before dispatch to catch errors early', providing a clear use case. It also warns about the 'unavailable' response when the backend is not deployed, setting expectations. Although it does not compare with alternatives, the guidance is sufficient for the agent.

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/Frihet-io/frihet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server