PDF invoice to XRechnung and ZUGFeRD
convert_invoiceConverts German PDF invoices into XRechnung 3.0 and ZUGFeRD e-invoices, validates them against KoSIT rules, and reports missing or incorrect fields for correction.
Instructions
Convert a German PDF invoice into an e-invoice: XRechnung 3.0 (UBL and CII), a ZUGFeRD PDF (EN 16931) and a check report, checked against the KoSIT rules. Files are written next to the PDF. If mandatory data is missing, nothing is written and the result lists the missing fields with a German label, help text and example: ask the user for them (or use the offered escape value when it fits), then call again with the same PDF and answers. Wrong values read from the PDF are fixed with corrections (keys from found[].edit[].key, e.g. fix:number). Each converted invoice counts once against the monthly quota of the user's pdfvera plan; the same PDF again in the same month does not count, check_only never counts.
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": {
"pdf_path": "<pdf_path>"
},
"name": "convert_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | Whether the user issued (issuer) or received (recipient) the invoice; only changes the wording of the questions | issuer |
| answers | No | Values for missing fields, keyed by questions[].field, e.g. {"buyer_reference": "04011000-12345-06"} | |
| pdf_path | Yes | Path of the PDF invoice on this computer | |
| check_only | No | Only check, write no files and use no quota | |
| output_dir | No | Folder for the result files; default: the PDF's folder | |
| corrections | No | Corrections of values read from the PDF, keyed by found[].edit[].key, e.g. {"fix:number": "RE-2026-0042"} |