Skip to main content
Glama

Check an e-invoice

check_invoice
Read-onlyIdempotent

Validates an e-invoice against EN 16931 and its national rules (XRechnung, Peppol BIS and others), with each finding explained in plain words and how to fix it. With country, also applies that country's national rules on top of EN 16931 (France: the CTC rules), only when asked; Klarbon never infers the country. Free within the account's daily checks; needs an API key.

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
countryNoAlso apply this country's national rules on top of EN 16931 (FR: the French CTC rules). Only when you give it; Klarbon never infers a country from the file.
rulesetNoA rule set id, or auto (the default) to pick it from the file. Leave it out when you give country.
file_urlNoA public https address of the file. Private and local addresses are refused.
filenameNoThe file's name, which helps recognise its format.
file_base64NoThe file's bytes as base64. Give this or file_url.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / ruleset / enum
      Previous value: -[
      -  "auto",
      -  "en16931-ubl",
      -  "en16931-cii",
      -  "en16931-ubl-creditnote",
      -  "xrechnung-3.0-ubl",
      -  "xrechnung-3.0-cii",
      -  "peppol-bis3-invoice",
      -  "peppol-bis3-creditnote",
      -  "facturx-1.07-minimum",
      -  "facturx-1.07-basicwl",
      -  "facturx-1.07-basic",
      -  "facturx-1.07-en16931",
      -  "facturx-1.07-extended",
      -  "zugferd-2.3-minimum",
      -  "zugferd-2.3-basicwl",
      -  "zugferd-2.3-basic",
      -  "zugferd-2.3-en16931",
      -  "zugferd-2.3-extended",
      -  "facturx-1.09-minimum",
      -  "facturx-1.09-basicwl",
      -  "facturx-1.09-basic",
      -  "facturx-1.09-en16931",
      -  "facturx-1.09-extended",
      -  "zugferd-2.5-minimum",
      -  "zugferd-2.5-basicwl",
      -  "zugferd-2.5-basic",
      -  "zugferd-2.5-en16931",
      -  "zugferd-2.5-extended",
      -  "nlcius",
      -  "nlcius-cii",
      -  "fr-ctc",
      -  "fr-ctc-cii"
      -]New value: +[
      +  "auto",
      +  "en16931-ubl",
      +  "en16931-cii",
      +  "en16931-ubl-creditnote",
      +  "xrechnung-3.0-ubl",
      +  "xrechnung-3.0-cii",
      +  "peppol-bis3-invoice",
      +  "peppol-bis3-creditnote",
      +  "facturx-1.07-minimum",
      +  "facturx-1.07-basicwl",
      +  "facturx-1.07-basic",
      +  "facturx-1.07-en16931",
      +  "facturx-1.07-extended",
      +  "zugferd-2.3-minimum",
      +  "zugferd-2.3-basicwl",
      +  "zugferd-2.3-basic",
      +  "zugferd-2.3-en16931",
      +  "zugferd-2.3-extended",
      +  "facturx-1.09-minimum",
      +  "facturx-1.09-basicwl",
      +  "facturx-1.09-basic",
      +  "facturx-1.09-en16931",
      +  "facturx-1.09-extended",
      +  "zugferd-2.5-minimum",
      +  "zugferd-2.5-basicwl",
      +  "zugferd-2.5-basic",
      +  "zugferd-2.5-en16931",
      +  "zugferd-2.5-extended",
      +  "nlcius",
      +  "nlcius-cii",
      +  "fr-ctc",
      +  "fr-ctc-cii",
      +  "ro.gov.mfinante.cius-ro-ubl-invoice-1.0.9"
      +]
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely useful behavior beyond that: authentication requirement ('needs an API key'), quota model ('Free within the account's daily checks'), and the shape of results (findings explained in plain words with fixes). It omits what happens when a file fails to parse or how findings are paginated, keeping it below 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?

Three dense sentences that front-load the core validation behavior, then the country rule, then the cost/auth caveat. The stacked semicolons make it slightly run-on, but no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the validation scope, the optional country overlay, result explainability, pricing and auth, which is most of what a 5-parameter validation tool needs. The one gap is that the schema marks zero required parameters while the description never explains that one of file_url or file_base64 must be supplied.

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?

Schema coverage is 100%, so all five parameters, both enums and the file_url/file_base64 alternative are already documented. The description's note that country is applied 'only when asked' and never inferred restates the schema's own wording rather than adding new meaning, so the baseline 3 is appropriate.

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?

States a specific verb and resource ('Validates an e-invoice against EN 16931') and names the rule families it applies, so the action is unambiguous. It never explicitly contrasts itself with siblings like convert_invoice or check_vat_numbers, but the validate-vs-convert distinction is inferable from the stated action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Gives conditional guidance for one parameter: apply national rules 'only when asked' and never infer the country. However, it offers no guidance on when to pick this tool over convert_invoice or open_invoice, and no prerequisites beyond 'needs an API key'.

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