Skip to main content
Glama

EU e-invoicing and business checks (EN 16931, Peppol, VAT, sanctions)

Check a received invoice before paying it

check_invoice
Read-only

Check a RECEIVED invoice before booking or paying it (accounts payable). Give the invoice XML (UBL / CII, XRechnung, Peppol, Factur-X XML) in xml, or a ZUGFeRD / Factur-X / plain PDF as base64 in pdf_base64. Runs EN 16931 / XRechnung validation, the supplier VAT ID in VIES (and the VIES name against the invoice), the supplier name against EU/UN/OFAC/UK sanctions, arithmetic (lines, VAT, totals, amount due), IBAN checksum and country, dates, and (my_vat) whether it is addressed to you. With an API key it also checks the account's invoice history: duplicates and a changed bank account for a known supplier (payment fraud), and saves the result (GET /inbox/invoices). Returns verdict ok | review | hold (hold = don't pay yet), ok_to_pay, summary and issues in plain English.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "check_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
xmlNoReceived invoice XML as text (UBL or CII). Give either xml or pdf_base64.
my_vatNoOptional: your own VAT ID, to warn when the invoice is addressed to another company.
pdf_base64NoBase64 of a received PDF invoice (ZUGFeRD / Factur-X with embedded XML, or a plain PDF).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior2/5

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

The description discloses a lot of behavior the annotations cannot express: the full list of checks performed, the API-key gating of history checks, and the verdict semantics (ok | review | hold, hold = don't pay yet). But it also states the tool 'saves the result (GET /inbox/invoices)', a persisted server-side side effect that conflicts with readOnlyHint=true, so an agent trusting the annotation would be misled – this is flagged as a contradiction rather than rewarded.

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 action and the two input options; every clause in the check list is substantive and no sentence merely restates the tool name. It is a dense single paragraph of lists, which is harder to scan than a short structured description, but there is no filler.

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 3-parameter, no-output-schema tool, this is complete: it names the standards checked, what each input accepts, how API-key presence changes behavior, the verdict vocabulary and that the return payload contains verdict, ok_to_pay, summary and issues. An agent could call it and interpret the result without further documentation.

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, and the description earns above that: it expands the accepted XML dialects beyond the schema's 'UBL or CII' (XRechnung, Peppol, Factur-X XML) and clarifies that pdf_base64 covers ZUGFeRD/Factur-X with embedded XML as well as plain PDFs, plus what my_vat is actually used for (addressee mismatch warning).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

A specific verb plus resource ('Check a RECEIVED invoice before booking or paying it') and the AP direction of flow are stated up front, then the check list is enumerated (EN 16931/XRechnung validation, VIES, sanctions, arithmetic, IBAN, duplicates). This clearly separates it from outbound tools such as create_einvoice/send_einvoice, though it never names the closest sibling (validate_einvoice), so the boundary with that tool has to be inferred.

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?

The usage window is explicit: run it before booking or paying a received invoice. Input routing is also given ('Give either xml or pdf_base64'). What is missing is a when-not-to-use clause and a named alternative for pure format validation or for outbound invoices, which the sibling catalog shows exist.

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.