Skip to main content
Glama

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

Preflight and sandbox-send an e-invoice

send_einvoice_sandbox

SANDBOX ONLY - never reaches a real buyer. Safe send: first checks the buyer VAT in VIES, whether the buyer can be reached on Peppol, and the buyer name against EU/UN/OFAC/UK sanctions lists, then creates + validates the EN 16931 invoice (same JSON as create_einvoice), and returns one preflight verdict: ok, warn or block, with a plain-English message per check and, for each invoice error, what is wrong, which field and how to fix it. A block (invalid VAT, close sanctions match, invoice errors) stops the send. Otherwise it routes, hands off to the transport and returns an Ed25519-signed evidence receipt (JWS). preflight_only=true: run only the checks and return the verdict, send nothing (use before every send). checks: subset of ["vat","peppol","sanctions"] (default all; validation always runs). transport: "mock" (simulated, default), "recommand" or "e-invoice-be" (the UBL is really submitted to that Peppol access point's sandbox, addressed to W System's own sandbox company). Use it to build and test an integration; real Peppol sending is the REST API POST /einvoice/send with mode=live, after a Peppol mandate and KYC review. autofix=true (only with preflight_only=true): run the checks on a copy with the safe fixes applied and return it in autofix.invoice; review it, then send that corrected invoice. A send never changes the invoice.

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": {
      "invoice": "<invoice>"
    },
    "name": "send_einvoice_sandbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
checksNoOptional subset of buyer checks: any of 'vat', 'peppol', 'sanctions' (default all; invoice validation always runs).
autofixNoOnly with preflight_only=true: run the checks on a copy with safe fixes applied and return it in autofix.invoice.
invoiceYesInvoice as simple JSON (same shape as create_einvoice).
transportNoSandbox transport: 'mock' (simulated, default), 'recommand' or 'e-invoice-be' (partner sandbox); never reaches a real buyer.mock
preflight_onlyNoIf true, only check the buyer (VAT, Peppol, sanctions) and the invoice; nothing is sent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / autofix / description
      Added value: +"Only with preflight_only=true: run the checks on a copy with safe fixes applied and return it in autofix.invoice."
    • addedInput schema / properties / checks / description
      Added value: +"Optional subset of buyer checks: any of 'vat', 'peppol', 'sanctions' (default all; invoice validation always runs)."
    • addedInput schema / properties / invoice / description
      Added value: +"Invoice as simple JSON (same shape as create_einvoice)."
    • addedInput schema / properties / preflight_only / description
      Added value: +"If true, only check the buyer (VAT, Peppol, sanctions) and the invoice; nothing is sent."
    • addedInput schema / properties / transport / description
      Added value: +"Sandbox transport: 'mock' (simulated, default), 'recommand' or 'e-invoice-be' (partner sandbox); never reaches a real buyer."
  2. Changed1 schema field changed
    • addedInput schema / properties / autofix
      Added value: +{
      +  "default": false,
      +  "title": "Autofix",
      +  "type": "boolean"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / checks
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Checks"
      +}
    • addedInput schema / properties / preflight_only
      Added value: +{
      +  "default": false,
      +  "title": "Preflight Only",
      +  "type": "boolean"
      +}
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag readOnlyHint=false, openWorldHint=true, idempotentHint=false and destructiveHint=false, so this is credited for what it adds beyond that: the exact block conditions (invalid VAT, close sanctions match, invoice errors), the Ed25519/JWS evidence receipt, and the assurance that 'a send never changes the invoice.' The only gap is that it never says the call consumes an external sandbox submission quota or what a transport failure returns.

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?

The safety-critical constraint is front-loaded in the first three words, and every paragraph carries distinct information. It is dense and slightly run-on in the middle section where checks and transport are packed into one block, 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?

With no output schema, the description still explains the return contract: one verdict of ok/warn/block, a plain-English message per check, per-error field and fix guidance, and an autofix.invoice copy. The invoice object itself is only deferred to create_einvoice for shape, which is reasonable but leaves the nested required fields unstated here.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

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

Schema coverage is already 100%, yet the description still adds material meaning: what each transport actually does ('the UBL is really submitted to that Peppol access point's sandbox, addressed to W System's own sandbox company'), the default-all behaviour of checks plus the fact validation always runs, and the autofix dependency on preflight_only with a review-then-send workflow.

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 (preflight + sandbox-send an e-invoice) and immediately scopes it: 'SANDBOX ONLY - never reaches a real buyer.' It distinguishes itself from create_einvoice (same JSON shape) and from real sending (REST POST /einvoice/send with mode=live), so an agent can pick it apart from siblings without opening a 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?

Gives explicit when-to-use ('Use it to build and test an integration'), a recommended habit ('preflight_only=true ... use before every send'), and the named alternative for production traffic. Exclusions are stated: a block stops the send, and real Peppol sending requires the live REST path after mandate and KYC.

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.