Skip to main content
Glama
Frihet-io

Frihet MCP Server

Validate E-Invoice XML

validate_einvoice_xml
Read-onlyIdempotent

Validate e-invoice XML documents against format-specific schemas and business rules. Detect errors early before dispatch to reduce transmission costs. Returns error list with severity and XPath.

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?

Description adds behavioral context beyond annotations: details different validators (KOSIT, Mustang, etc.) per format, error output structure, and honesty about backend unavailability. No contradiction with annotations (readOnlyHint, idempotentHint, destructiveHint).

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?

Description is clear and front-loaded with main action. Bilingual adds length but is acceptable. Every sentence adds value, though could be slightly shortened 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 2 simple params, output schema exists, description explains return values (error list with severity, XPath, etc.) and edge case (backend unavailable). Complete for a validation tool.

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 has 100% coverage with descriptions for both parameters. Description adds value by explaining how format determines which validator runs, providing context beyond the enum list. No extra info for xml parameter, but schema already sufficient.

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 e-invoice XML against schema and schematron rules, specifies format parameter, and returns errors. Distinguishes itself from sibling tools like einvoice_export and send_einvoice.

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?

Explicitly recommends use before dispatch to catch errors without network costs. Provides context on valid=true meaning and honest 'unavailable' response. Lacks explicit when-not-to-use instructions but sufficiently guides usage.

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