Skip to main content
Glama

Muteware e-invoice tools

Check an e-invoice

check_e_invoice
Read-onlyIdempotent

Reads the XML of an electronic invoice (UBL as used by Peppol BIS and XRechnung, or CII as used by XRechnung, ZUGFeRD and Factur-X) and tests it: the main fields are present, the lines add up to the totals, net plus VAT is gross, the VAT per rate adds up and follows from base and percentage, the amount to pay is right and the IBAN of the payment has correct check digits. Every test comes back with a sentence in plain words. It is not a validation against the XML schema or the Schematron rules of EN 16931, Peppol or XRechnung. Give the XML text itself, not a PDF.

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

Input Schema

NameRequiredDescriptionDefault
xmlYesThe XML text of the invoice (UBL or CII), complete, starting at <?xml or at the outer element. At most 150000 characters.

Output Schema

NameRequiredDescriptionDefault
buyerNo
scopeNo
checksNo
formatNo
numberNo
reasonNo
sellerNo
syntaxNo
messageNo
verdictNo
currencyNo
documentNo
problemsNo
readableYes
issue_dateNo
profile_idNo
amount_to_payNo

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.2/5.0
Behavior4/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 real behavioral context beyond them: the scope exclusion versus EN 16931/Peppol/XRechnung validation and the fact that each test returns a plain-language sentence. It does not discuss cost, size limits on input processing, or failure modes, which keeps it short of a 5.

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 what it does, then the check list, then the scope caveat and the input-format rule. The enumerated checks are long but each is informative; a slightly tighter grouping of the arithmetic tests would lose nothing.

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?

An output schema exists, so return values need no explanation, and the description still characterizes the response ('a sentence in plain words' per test). For a single-parameter read-only checker, 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.

Parameters3/5

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

With one parameter at 100% schema coverage, the schema already documents the field. The description adds only marginal meaning ('give the XML text itself, not a PDF') and the accepted dialects (UBL/CII) are already named in the schema, so the baseline 3 applies.

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 ('reads the XML of an electronic invoice ... and tests it') and enumerates the concrete checks: field presence, line sums to totals, net+VAT=gross, VAT per rate, amount payable, IBAN check digits. It also draws a sharp boundary against schema/Schematron validation, so an agent can distinguish this consistency checker from a full EN 16931 validator.

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 usage conditions: supply the XML text itself, not a PDF, and understand this is not a schema/Schematron validation. It does not explicitly route to a sibling (e.g. read_e_invoice for extraction only), so the when-not case is covered but the alternative-tool case is left to inference.

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