Read an invoice as JSON
parse_invoiceRead a UBL invoice or credit note into plain JSON: seller and buyer (names, VAT and legal ids, address, contact), every line (quantity, unit, price, net amount, VAT category and rate), the VAT breakdown, the totals, and the payment terms (due date, terms, IBAN). Every value is the document's own text, amounts included, never a number; a field the document does not fill is absent. Give the XML text as xml, which the server hashes (answered in file: size, sha256). Reads only: nothing goes to ANAF. To have ANAF check the document, use validate_invoice.
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": "parse_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| xml | No | A UBL invoice or credit note, as the XML text itself (at most 1048576 characters). The server hashes the bytes it receives and answers their sha256 and size (file), so compare them with your source. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | The file read, when the document came as xml | |
| archive | No | The archive read, when it came from the outbox | |
| invoice | Yes |