Skip to main content
Glama
cmendezs

mcp-einvoicing-be

validate_invoice_be

Validate UBL 2.1 XML invoices against Belgian e-invoicing rules for Peppol BIS 3, PINT-EU, or Mercurius profiles, with structured per-rule errors and warnings.

Instructions

Validate a UBL 2.1 XML invoice against Belgian business rules.

For 'peppol-bis-3'/'pint-eu': checks the CEN EN16931 base rules (structural + arithmetic/totals, ~50 BR-* rules) via a compiled Schematron. Does NOT check the Peppol-specific overlay (profile ID registration, EndpointID scheme, narrowed code lists) — the result's metadata.scope is "en16931-base-only", and a warning is included. This is not a full Peppol BIS3 conformance check; a document that passes may still be rejected by a real Peppol Access Point (no confirmed OpenPeppol redistribution rights for the overlay rules). For 'mercurius': applies the Mercurius-specific overlay rules only (endpoint scheme, PO reference) — also not full EN16931/Peppol base compliance. Returns a structured result with per-rule error and warning messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlYesRaw UBL 2.1 XML invoice content
profileNoValidation profile: 'peppol-bis-3' (default), 'pint-eu', or 'mercurius'peppol-bis-3

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.1
    • changedInput schema / properties / profile / description
      Previous value: -"Validation profile: 'peppol-bis-3' (default), 'pint-be', or 'mercurius'"New value: +"Validation profile: 'peppol-bis-3' (default), 'pint-eu', or 'mercurius'"
    • changedInput schema / properties / profile / enum
      Previous value: -[
      -  "peppol-bis-3",
      -  "pint-be",
      -  "mercurius"
      -]New value: +[
      +  "peppol-bis-3",
      +  "pint-eu",
      +  "mercurius"
      +]
  2. First observedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the exact rule set applied, explicitly states what is NOT checked (Peppol overlay, full Mercurius/EN16931 compliance), exposes the metadata.scope value, warns that a passing document may still be rejected, and notes the redistribution-rights caveat behind the scope limitation.

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?

Front-loaded with the core purpose, then organized by profile. Dense but largely non-redundant; the OpenPeppol redistribution-rights parenthetical is the only mildly tangential detail, but it justifies the scope limitation.

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?

For a validation tool with an output schema present, the description delivers everything needed: what it validates, per-profile scope, what it deliberately omits, and the nature of the returned result (per-rule errors/warnings). No critical gap remains 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% and the enum itself is documented, so baseline is 3. The description goes beyond the schema by explaining what each of the three profile values actually does at the rule level, giving the parameter real behavioral meaning rather than just a label list.

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+resource ('Validate a UBL 2.1 XML invoice') and immediately scopes it to Belgian business rules. It further differentiates expected behavior per profile value, so an agent understands exactly what kind of validation this is versus the many code-check siblings.

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?

Gives clear per-profile context: 'peppol-bis-3'/'pint-eu' run the EN16931 base rules, 'mercurius' runs only the Mercurius overlay. This tells the agent which profile to pick for a given need, though it does not explicitly name alternative tools (e.g. generate_invoice_be, parse_ubl_invoice_be) or state when a different validation tool should be used instead.

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