Parse Ubl Invoice
parse_ubl_invoiceParse UBL 2.1 invoice XML into EN 16931 structured fields to inspect cross-border invoices or verify generated UBL output. Returns JSON-serializable dict or error.
Instructions
Parse a UBL 2.1 invoice XML string into an EN 16931 structured dict.
Extracts the EN 16931 core field set. Italian national fields (progressivo_invio, regime_fiscale, etc.) are returned with their ItalianInvoice defaults since UBL 2.1 does not carry them.
Use this to inspect cross-border invoices received in UBL format, or to round-trip the output of generate_ubl_invoice() for verification.
On success returns the ItalianInvoice fields as a JSON-serialisable dict. On failure returns {'error': str}.
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_string": "<xml_string>"
},
"name": "parse_ubl_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml_string | Yes | UBL 2.1 Invoice or CreditNote XML string to parse. Returns an EN 16931 field dict. National extensions are silently ignored. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||