Skip to main content
Glama

specgrid-eu-compliance

Validate Peppol UBL & Facturae XML

einvoice_validate
Read-onlyIdempotent

Audit an existing OASIS UBL 2.1 (EN 16931 / Peppol BIS Billing 3.0 / XRechnung) or Spanish Facturae 3.2.2 XML invoice against mandatory business rules, cent-exact monetary math (BR-CO-10, BR-CO-13, BR-CO-15, BR-CO-16), and XXE security hazards. Stateless, read-only, deterministic with zero retention; auto-detects XML standard and returns valid (boolean), standard, errors[], warnings[], and extracted summary (returns isError=true on DOCTYPE/ENTITY XXE payloads or unparseable XML). Use before sending or ingesting third-party XML invoices; use einvoice_generate instead to build compliant XML from JSON.

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": "einvoice_validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlYesComplete raw XML string of a UBL 2.1 Invoice/CreditNote (EN 16931 / Peppol / XRechnung) or Spanish Facturae 3.2.x document; must not contain DOCTYPE or ENTITY declarations.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / xml / description
      Previous value: -"Raw UBL 2.1 or Facturae 3.2.2 XML document"New value: +"Complete raw XML string of a UBL 2.1 Invoice/CreditNote (EN 16931 / Peppol / XRechnung) or Spanish Facturae 3.2.x document; must not contain DOCTYPE or ENTITY declarations."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, but the description adds genuinely new behavior: stateless, deterministic, zero retention, and auto-detection of the XML standard. It further discloses the failure contract (isError=true on DOCTYPE/ENTITY XXE payloads or unparseable XML), which is exactly the kind of edge-case behavior annotations cannot convey.

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?

Three dense sentences, front-loaded with capability, then behavior/return contract, then routing guidance. Nothing is redundant, though the middle sentence packs several claims (stateless, retention, auto-detect, return shape, error semantics) tightly enough that it reads as a run-on.

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?

No output schema exists, but the description compensates by naming the returned fields (valid, standard, errors[], warnings[], extracted summary) and the error path. For a single-parameter, read-only validator, nothing an agent needs in order to call it correctly is missing.

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?

With a single parameter at 100% schema coverage, the schema already carries the format constraints and the no-DOCTYPE/no-ENTITY rule. The description still adds meaning beyond the schema by telling the caller the standard is auto-detected, so no format selector is needed and the full raw document must be supplied.

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?

Opens with a specific verb (audit/validate) applied to a precisely named resource: OASIS UBL 2.1 (EN 16931 / Peppol BIS 3.0 / XRechnung) and Facturae 3.2.2 invoice XML. It also enumerates the checks performed (mandatory business rules, BR-CO monetary math, XXE hazards) and explicitly contrasts itself with einvoice_generate, so the agent can distinguish it from siblings without opening 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 Guidelines5/5

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

States the trigger condition directly: "Use before sending or ingesting third-party XML invoices." It also names the alternative and the condition that selects it: "use einvoice_generate instead to build compliant XML from JSON," which effectively defines the when-not case for this tool.

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.

Resources