Gated four-step e-invoice validation pipeline. Checks a supplied e-invoice extract against version-pinned Factur-X, XRechnung, PINT-AE, MyInvois, Peppol BIS 3.0 (Belgium, mandatory since 2026-01-01), or KSeF FA(3) (Poland, mandatory-use phase-in from 2026-02-01) format rules, recomputes VAT arithmetic against the document-asserted amounts, routes the transaction to its applicable jurisdiction mandate, and composes a hash-anchored transmission receipt carrying the SPEC.md §27 pre-transmission release gate (review_required, schema-only pending HA-RETRO-1). Exits immediately on a format-conformance failure or a VAT-arithmetic mismatch, so the receipt is only ever built for a document that passed both gates.
skipped_by_gate in the run artifact.validate_einvoice_format{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "validate_einvoice_format",
"arguments": {
"document": {
"format": "xrechnung",
"fields": {"invoice_number": "INV-1", "invoice_date": "2026-09-15", "currency_code": "EUR", "seller_name": "Acme GmbH", "seller_vat_id": "DE123456789", "buyer_name": "Buyer SAS", "leitweg_id": "04011000-12345-67"},
"line_items": [{"line_id": 1, "net_amount": 1000, "vat_category": "S", "vat_rate_pct": 19}]
}
}
},
"id": 1
}
verify_einvoice_vat_calc{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "verify_einvoice_vat_calc",
"arguments": {
"document": {
"line_items": [{"line_id": 1, "net_amount": 1000, "vat_category": "S", "vat_rate_pct": 19}],
"tax_subtotals_asserted": [{"vat_category": "S", "vat_rate_pct": 19, "taxable_amount": 1000, "tax_amount": 190}],
"grand_total_asserted": 1190,
"tax_total_asserted": 190
},
"rounding": {"method": "half-up", "granularity": "per-line"}
}
},
"id": 2
}
route_einvoice_jurisdiction_mandate{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "route_einvoice_jurisdiction_mandate",
"arguments": {
"supplier_country": "DE",
"buyer_country": "FR",
"transaction_type": "B2B",
"transaction_date": "2026-09-15"
}
},
"id": 3
}
build_einvoice_transmission_receipt{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "build_einvoice_transmission_receipt",
"arguments": {
"document": {"document_sha256": "", "format": "xrechnung"},
"format_validation": {"structural_completeness": true},
"vat_verification": {"consistent": true},
"routed_mandate": {"regime_country": "FR", "applicable_format": "factur-x_or_ubl", "mandatory_from": "2026-09-01", "phase_status": "mandatory", "transmission_channel": "PDP"}
}
},
"id": 4
}
Copy this paragraph into Claude, OpenClaw, or any MCP-aware agent to run this whole workflow on the server and check one field that answers a real question.
Question: We just won a customer in Germany while our e-invoicing was built for France. What format and channel does the mandate table demand there?
Run the AINumbers MCP tool `run_chain` with {"chain":"einvoice-validation-pipeline"} and read `art-295-einvoice-jurisdiction-mandate-router.applicable_format`.
Re-run with `inputs` for `art-295-einvoice-jurisdiction-mandate-router`, reusing the values that result echoed, with `buyer_country` set to "DE". Compare the same field.
Verify: call `verify_execution_hash` (https://mcp.ainumbers.co/mcp) with `claimed_hash` set to `composite_execution_hash` and the full `composite_artifact`.
Ledger, for a human re-check: https://ledger.ainumbers.co/
PII rule: send synthetic or anonymised inputs only. The MCP server runs these kernels and logs no payloads.
Chain page: https://ainumbers.co/chaingraph/chains/einvoice-validation-pipeline.html