Skip to main content
Glama
EU Business Data MCP

EU Business Data MCP

Validate an e-invoice (EN 16931, XRechnung, Peppol BIS)

validate_einvoice
Read-onlyIdempotent

Check EU e-invoice XML (UBL/CII) against EN 16931 and XRechnung 3.0 rules to catch errors before sending or after receiving.

Instructions

Validate an EU e-invoice XML you already have (UBL 2.1 Invoice/CreditNote or UN/CEFACT CII, e.g. XRechnung, Factur-X/ZUGFeRD XML) against the official CEN EN 16931 rules and, for XRechnung, the KoSIT XRechnung 3.0 rules. Use when: checking an invoice before sending it or after receiving it. To build a new invoice from data use create_einvoice. Input: xml as text; rules = auto | en16931 | xrechnung. Peppol-specific rules are not checked yet; for PDFs use the REST endpoint POST /einvoice/validate. Output: {valid, syntax, errors: [{rule_id (e.g. BR-CO-10), severity, message, location (XPath), fix}], warnings, checked}.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "xml": "<xml>"
    },
    "name": "validate_einvoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlYesThe e-invoice XML as text: UBL 2.1 Invoice/CreditNote or UN/CEFACT CII (XRechnung, Factur-X/ZUGFeRD XML).
rulesNoRule set: 'auto' (detect from the invoice, default), 'en16931' or 'xrechnung'.auto

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantive behavior beyond them: which rule packs actually run, the explicit gap that Peppol rules are not yet enforced, and a field-by-field sketch of the error objects (rule_id such as BR-CO-10, severity, message, XPath location, fix). This is exactly the limitation disclosure an agent needs before trusting a 'valid' result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded (verb, scope, syntaxes) and then organized into Use when / Input / Output blocks, with zero filler sentences. Every clause carries information an agent would otherwise have to guess.

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 definition documents the return shape and the meaning of each error field, plus scope limitations and the out-of-scope PDF path. For a two-parameter validation tool this leaves no material gap for correct invocation.

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 coverage is 100%, so the baseline is 3; the description goes slightly further by explaining what the rule-set choice means in practice (official EN 16931 rules vs. KoSIT XRechnung 3.0) and restating that 'auto' is the default detection mode. It does not clarify what 'auto' does when detection is ambiguous, which keeps it short of a 5.

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 opens with a specific verb+resource ('Validate an EU e-invoice XML'), enumerates the supported syntaxes (UBL 2.1 Invoice/CreditNote, UN/CEFACT CII, Factur-X/ZUGFeRD) and names the exact rule sets applied (CEN EN 16931, KoSIT XRechnung 3.0). It explicitly separates itself from the sibling create_einvoice, so an agent can pick it without opening a schema.

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?

It gives a concrete when-to-use trigger ('checking an invoice before sending it or after receiving it') and names the alternative for the opposite intent ('To build a new invoice from data use create_einvoice'). It also states exclusions: Peppol-specific rules are not checked yet, and PDFs must go to the REST endpoint POST /einvoice/validate.

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