Skip to main content
Glama

Validate e-invoice

validate_invoice

Run the official rule set for the detected format (KoSIT for XRechnung/ZUGFeRD/Factur-X, OpenPeppol for Peppol BIS, FA(3) schema for KSeF, Porezna uprava HR-CIUS schematron for Croatian eRačun, Facturae XSD + calculation/NIF/DIR3 rules for Spain, LHDN SDK rules for MyInvois). Returns valid/invalid with every failed rule: id, severity, message, XPath.

Input Schema

NameRequiredDescriptionDefault
kositNoRun the full KoSIT schematron (default true). false = schema and core checks only, faster
contentNoInvoice XML (UBL, CII, XRechnung, Peppol BIS, ZUGFeRD/Factur-X XML, KSeF FA(3)) as text
content_base64NoA ZUGFeRD / Factur-X PDF (or any invoice file) as base64, when the invoice is not plain XML

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose the return shape ('valid/invalid with every failed rule: id, severity, message, XPath') and that it delegates to external official rule sets per format. It does not state permission/auth needs, network or runtime characteristics, or that it is strictly non-mutating, so it stops short of full disclosure.

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?

Two sentences, with the core action and return contract front-loaded. The parenthetical format/rule-set mapping is long but information-dense and non-redundant, so it earns its space; only minor tightening is possible.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the rule-set matrix and the failure-report shape well for a tool with no output schema and no annotations. It is incomplete on the practical contract, though: required=0 while one of content/content_base64 must actually be supplied, and the detect_invoice prerequisite is only implied rather than stated.

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

Parameters3/5

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

Schema description coverage is 100%, so all three parameters (kosit, content, content_base64) are already documented in the schema, which sets the baseline at 3. The description adds no syntax or format detail beyond the schema for kosit, content, or content_base64, and notably omits that one of the two content inputs is effectively required despite required=0.

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?

States a specific verb and resource ('Run the official rule set for the detected format') and enumerates exactly which rule set applies per format (KoSIT, OpenPeppol, FA(3), HR-CIUS, Facturae, LHDN). This clearly separates it from sibling tools like detect_invoice, parse_invoice, and fix_invoice without needing to open any schema.

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

Usage Guidelines3/5

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

The phrase 'for the detected format' implies a detect_invoice step must precede this call, which is useful implied sequencing. However, it never explicitly says when to choose this over fix_invoice or parse_invoice, and names no exclusions or prerequisites for the content inputs.

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.