Skip to main content
Glama

Validate an existing invoice XML file (UBL or CII)

validate_invoice_xml
Read-onlyIdempotent

Validate an e-invoice FILE the user already has, in either EN 16931 syntax and of either document type. Reads a UBL 2.1 Invoice, a UBL 2.1 CreditNote or a UN/CEFACT CII CrossIndustryInvoice (which carries invoices and credit notes alike) into the invoice model and runs EN 16931 plus the CIUS rules (XRechnung UBL and CII, Peppol BIS 3) over it, returning the same teaching errors as validate_invoice, plus which syntax it read, the document's BT-24/BT-23 and a list of everything in the file that did not reach the model. Use it when someone says "this invoice was rejected, why?" and hands you a file. Send the file as-is; do not work out the syntax or the document type first, because the tool decides both from the root element and reports what it found in syntax and in the invoice model's BT-3. XML ONLY, NOT A PDF: Factur-X and ZUGFeRD are CII XML inside a PDF/A-3 container, and this tool cannot open the container — extract the XML and send that. A PDF is refused with an explanation; do not retry it. A credit note is NOT refused — send it exactly like an invoice. It is a pre-flight, not an authority: a file that passes here can still be rejected by KoSIT or by a receiving platform. REQUIRES AN API KEY and costs 1 document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesThe complete document, as text — the file contents, not a path. Its root element must be <Invoice> in the UBL Invoice-2 namespace, <CreditNote> in the UBL CreditNote-2 namespace, or <CrossIndustryInvoice> in the UN/CEFACT CII namespace. Not the bytes of a PDF.

TDQS

A4.9/5.0
Behavior5/5

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

With annotations declaring readOnly and idempotent, the description adds valuable context: requires an API key, costs 1 document, decides syntax from the root element, reports unmodeled content, and refuses PDFs with an explanation. No contradiction with annotations; behavior is fully disclosed beyond what annotations alone indicate.

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 dense but every sentence contributes: input constraints, accepted formats, error behavior, return values, cost, and limitations. It is slightly long but warranted given the tool's complexity and the need to prevent common misuse (e.g., sending PDF containers). Structure is logical: definition, usage trigger, exclusions, caveats, requirements.

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?

Despite having no output schema, the description enumerates expected return elements (syntax, BT-24/BT-23, teaching errors, unmodeled content) and clarifies edge cases (credit notes accepted, PDFs refused, pre-flight not authoritative). It also mentions API key and cost. This makes the tool's behavior and constraints complete for an agent to decide and invoke appropriately.

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?

Schema description already covers the 'xml' parameter (complete text, not a path, allowed root elements, not PDF bytes). The tool description goes further by instructing to send the file as-is without pre-determining syntax or document type, explaining why (tool decides from root element), and reinforcing that a PDF should not be sent. This adds operational meaning beyond the schema.

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 an existing e-invoice file (UBL or CII) and returns teaching errors, syntax, BT-24/BT-23, and unmodeled content. It distinguishes itself from sibling validate_invoice by explicitly saying it returns the same errors plus additional file-specific information, making its scope clear.

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 when-to-use guidance: "Use it when someone says 'this invoice was rejected, why?' and hands you a file." It also gives clear exclusions (XML only, not PDF; extract XML from Factur-X/ZUGFeRD; PDFs are refused and should not be retried) and notes credit notes are accepted. The pre-flight disclaimer (not an authority) further calibrates expectations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: validation (two input formats), generation, rule explanation, company readiness, VIES status, platform listing, key issuance, and upgrade link. Even the two validation tools are clearly split by input type (JSON vs XML), and the descriptions explicitly prevent confusion.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern (check_, explain_, generate_, get_, issue_, list_, validate_). The verbs are precise and the nouns clearly indicate the target, with no mixing of conventions or vague terms.

Tool Count5/5

Nine tools is well within the ideal scope for a specialized e-invoicing compliance server. Each tool serves a distinct purpose in the workflow—validate, generate, explain, check company/VIES/platform status, and manage API keys—without redundancy or bloat.

Completeness5/5

The tool surface covers the full lifecycle of e-invoicing compliance: validation (JSON and XML), generation, rule explanation, and external status checks (company, VIES, approved platforms). API key management and upgrade paths are also included. No obvious missing operations for the stated purpose.

Resources