parse_erechnung
Extracts structured invoice header, seller, buyer, bank IBAN, tax breakdown, and line items from ZUGFeRD PDFs, XRechnung XML, or legacy flat PDFs and returns verified JSON.
Instructions
Extract structured invoice header, seller, buyer, bank IBAN, tax breakdown, and line items from a ZUGFeRD PDF, XRechnung XML, or legacy flat PDF. Extracts embedded XML deterministically in ~20ms (source='NATIVE_XML') or falls back to guarded extraction on flat PDFs (source='AI_EXTRACTED'). Use for data extraction (Empfangspflicht); use validate_erechnung instead for strict KoSIT/veraPDF compliance checks. Returns JSON with source, math_verified, iban_valid, invoiceNumber, issueDate, currency, seller, buyer, items[], netTotal, vatTotal, and grossTotal.
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_erechnung"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | Optional original filename ending in .pdf or .xml. | |
| fileBase64 | No | Base64-encoded ZUGFeRD PDF, flat legacy PDF, or XRechnung XML file to parse (provide either fileBase64 or xmlContent). | |
| xmlContent | No | Raw UTF-8 XRechnung or Factur-X XML string to parse (alternative to fileBase64). |