EN 16931 & XRechnung Deterministic E-Invoice Validator
validate_en16931_e_invoiceDeterministically validates European B2B electronic invoices (EN 16931, XRechnung 3.0.2, ZUGFeRD / Factur-X, UBL 2.1, UN/CEFACT CII) using KoSIT-aligned XML/Schematron rules and XXE-safe defusedxml parsing. Use this tool whenever an agent must verify invoice XML syntax, CustomizationID, VAT/currency structure, or obtain cryptographic proof before ERP ingestion. Operates strictly read-only in volatile EU RAM (zero PII retention) and returns a signed Ed25519 W3C Verifiable Credential. Free Pre-GmbH technical preview (0.00 EUR, non-binding format check; not tax or legal advice).
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_content": "<xml_content>"
},
"name": "validate_en16931_e_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml_content | Yes | Complete raw EN 16931 / XRechnung / UBL Invoice or UN/CEFACT CrossIndustryInvoice XML document string. | |
| max_accepted_fee_eur | No | Optional maximum x402 fee in EUR accepted by the caller (planned post-GmbH list price 0.12 EUR; 0.00 EUR in Pre-GmbH Shadow-Pass). Omit if unpaid. | |
| ap2_intent_mandate_id | No | Optional AP2 (Agent Payments Protocol) intent mandate reference ID for audit correlation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Credential types (including 'VerifiableCredential' and domain attestation type). | |
| proof | Yes | Ed25519 cryptographic signature proof verifiable via /.well-known/did.json. | |
| issuer | Yes | Cryptographic issuer DID ('did:web:iotpay.eu'). | |
| @context | No | W3C Verifiable Credentials context URIs. | |
| issuanceDate | Yes | ISO-8601 UTC issuance timestamp. | |
| credentialSubject | Yes | Deterministic verification verdict, structured findings, and SHA-256 payload hash. |