{"at":"2026-11-23T05:33:48.919Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:33:49.775Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T05:33:49.926Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T05:33:50.733Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"instructions":"pdf-to-einvoice turns an existing invoice PDF into an EN 16931 e-invoice (ZUGFeRD / Factur-X): the invoice data is attached to the PDF as XML, the pages stay as they are. It also writes the data as an XRechnung, the XML German public bodies ask for. The tools run on the user's machine and send nothing. What you read through them is yours to handle: if your model runs elsewhere, the content of the invoice goes there, so do not tell the user that it stays on their machine unless that holds for you.\n\nWorkflow:\n1. read_invoice_pdf: get the text of the PDF and a first guess of the values (parties, line items, totals and more).\n2. Fill in the invoice data from that text (the fields are described in the input schema of check_invoice).\n3. check_invoice with pdf_path: fix every error; look at every warning.\n4. Show the user the data and the findings, and wait for their confirmation.\n5. create_einvoice.\n\nXRechnung (version 3.0) is for an invoice to a German public body, or for a user who asks for it by name; do not choose it on your own. It takes more data: the buyer reference (the Leitweg-ID, which the public body names), a contact at the seller with phone number and e-mail address, and an e-mail address of the buyer. In step 3 pass rules \"xrechnung\" to check_invoice. In step 5 call create_xrechnung for the XML alone (UBL, or CII if asked for), or create_einvoice with profile \"xrechnung\" for a PDF that carries that XML. Ask the user for what is missing; a Leitweg-ID is never made up.\n\nTo check an e-invoice that already exists, issued or received, call validate_einvoice: it reads the embedded XML and reports what is missing, what does not add up and what the visible PDF does not show; it is a plausibility check, not a full EN 16931 validation, and you say so with the result.\n\nRules:\n- You act for the invoice ISSUER (the seller). A recipient cannot make a received PDF a valid e-invoice; say so if that is what is asked.\n- Copy values exactly as the PDF prints them. Never invent, guess or \"correct\" a value. If something is missing or unclear, ask the user.\n- Always show the user the findings. A \"not-in-pdf\" warning means a value does not occur in the PDF text: check it.\n- The XML is the legally binding part of the e-invoice and must not contradict the PDF. The user must confirm the data before create_einvoice or create_xrechnung.\n- This is not tax or legal advice. Which VAT category applies is the user's decision; ask when the PDF does not say.","protocolVersion":"2025-11-25","serverInfo":{"name":"pdf-to-einvoice","version":"0.2.0"}}}}
{"at":"2026-11-23T05:33:50.733Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T05:33:50.733Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T05:33:50.735Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Reads an invoice PDF from disk. Returns its text row by row, values found by pattern (number, dates, parties, line items, totals, payment terms, bank details, tax IDs; a starting point, not a result) and facts about the PDF: page count, fonts that are not embedded, and whether it is already an e-invoice.","inputSchema":{"properties":{"pdf_path":{"description":"The invoice PDF. Absolute path.","type":"string"}},"required":["pdf_path"],"type":"object"},"name":"read_invoice_pdf","title":"Read an invoice PDF"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Checks invoice data against the main EN 16931 rules (required fields, formats, arithmetic, VAT categories) and the particulars German VAT law asks for. It is not a full validator. Returns { ok, findings, totals }: errors block the e-invoice, warnings need a second look, totals are calculated from the lines. The data may be incomplete; what is missing is reported. With pdf_path, values that do not occur in the text of the PDF are reported too. With rules \"xrechnung\", what XRechnung 3.0 asks for beyond EN 16931 is reported too, under codes that start with \"xrechnung-\".","inputSchema":{"properties":{"invoice":{"additionalProperties":false,"description":"Invoice data as printed on the PDF. Copy values exactly; leave out anything the document does not state.","properties":{"bic":{"description":"BIC of the seller bank.","type":"string"},"buyer":{"additionalProperties":false,"properties":{"city":{"description":"City.","type":"string"},"contactName":{"description":"Contact person.","type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. DE, AT, FR.","pattern":"^[A-Z]{2}$","type":"string"},"email":{"description":"E-mail address.","type":"string"},"name":{"description":"Full legal name of the buyer (the invoice recipient).","type":"string"},"phone":{"description":"Phone number.","type":"string"},"postalCode":{"description":"Postal code.","type":"string"},"street":{"description":"Street and house number.","type":"string"},"vatId":{"description":"VAT identification number of the buyer (the invoice recipient) with country prefix, e.g. DE123456789.","type":"string"}},"type":"object"},"buyerReference":{"description":"Reference given by the buyer (Leitweg-ID for German public bodies).","type":"string"},"currency":{"description":"ISO 4217 currency code. Default EUR.","pattern":"^[A-Z]{3}$","type":"string"},"deliveryCountry":{"description":"Country the goods went to, as ISO 3166-1 alpha-2 code. State it for an intra-community supply (category K) that did not go to the country of the buyer.","pattern":"^[A-Z]{2}$","type":"string"},"deliveryDate":{"description":"Date of delivery or service. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"dueDate":{"description":"Payment due date. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"iban":{"description":"IBAN of the seller.","type":"string"},"issueDate":{"description":"Invoice date. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"lines":{"items":{"additionalProperties":false,"properties":{"description":{"description":"Further description.","type":"string"},"discount":{"additionalProperties":false,"description":"Discount on this line as printed: a percentage of quantity x unit price, an amount, or both.","properties":{"amount":{"description":"Discount amount. Negative on a line with a negative quantity.","type":"number"},"percent":{"description":"Percentage, e.g. 10.","type":"number"},"reason":{"description":"Reason as printed, e.g. \"Treuerabatt\".","type":"string"}},"type":"object"},"name":{"description":"Item or service name.","type":"string"},"netAmount":{"description":"Net line total as printed.","type":"number"},"quantity":{"description":"Quantity.","type":"number"},"unit":{"description":"UN/ECE Rec. 20 unit code: C62 piece (default), HUR hour, DAY day, MON month, KGM kilogram, MTR metre, LTR litre, LS lump sum.","type":"string"},"unitPrice":{"description":"Net price per unit, without VAT.","type":"number"},"vatCategory":{"description":"S standard rate (default), Z zero rated, E exempt, AE reverse charge, K intra-community supply, G export, O not subject to VAT.","enum":["S","Z","E","AE","K","G","O"],"type":"string"},"vatRate":{"description":"VAT rate in percent, e.g. 19.","type":"number"}},"type":"object"},"type":"array"},"note":{"description":"Free text note.","type":"string"},"number":{"description":"Invoice number.","type":"string"},"orderReference":{"description":"Purchase order number.","type":"string"},"paymentTerms":{"description":"Payment terms as printed, e.g. \"Payable within 14 days\".","type":"string"},"periodEnd":{"description":"End of the service period. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"periodStart":{"description":"Start of the service period, if a period is given instead of a single date. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"precedingInvoiceDate":{"description":"Date of that earlier invoice. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"precedingInvoiceNumber":{"description":"Number of the invoice this document corrects or cancels.","type":"string"},"prepaidAmount":{"description":"Amount already paid.","type":"number"},"seller":{"additionalProperties":false,"properties":{"city":{"description":"City.","type":"string"},"contactName":{"description":"Contact person.","type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. DE, AT, FR.","pattern":"^[A-Z]{2}$","type":"string"},"email":{"description":"E-mail address.","type":"string"},"name":{"description":"Full legal name of the seller (the company that issued the invoice).","type":"string"},"phone":{"description":"Phone number.","type":"string"},"postalCode":{"description":"Postal code.","type":"string"},"street":{"description":"Street and house number.","type":"string"},"taxNumber":{"description":"Local tax number of the seller (German Steuernummer).","type":"string"},"vatId":{"description":"VAT identification number of the seller (the company that issued the invoice) with country prefix, e.g. DE123456789.","type":"string"}},"type":"object"},"totals":{"additionalProperties":false,"description":"Totals exactly as printed on the invoice.","properties":{"due":{"description":"Amount due for payment.","type":"number"},"gross":{"description":"Total including VAT.","type":"number"},"net":{"description":"Total without VAT.","type":"number"},"vat":{"description":"Total VAT.","type":"number"}},"type":"object"},"typeCode":{"description":"380 invoice (default), 381 credit note, 384 corrected invoice, 389 self-billed invoice, 326 partial invoice, 386 prepayment invoice.","enum":["326","380","381","384","386","389"],"type":"string"},"vatExemptionReason":{"description":"Printed reason why no VAT is charged (reverse charge, small business, export ...).","type":"string"}},"title":"Invoice","type":"object"},"pdf_path":{"description":"The invoice PDF to compare the data with. Optional. Absolute path.","type":"string"},"rules":{"description":"Further rules to check the data against. Optional.","enum":["xrechnung"],"type":"string"}},"required":["invoice"],"type":"object"},"name":"check_invoice","title":"Check invoice data"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Writes the e-invoice: a copy of the PDF as PDF/A-3 with the invoice attached as factur-x.xml (Factur-X / ZUGFeRD, profile EN 16931). The input PDF is never changed. Call it only after check_invoice reports no errors and the user has confirmed the data. Returns { output_path, findings, totals }; with errors in the data nothing is written and the findings say what to fix. With profile \"xrechnung\" the data has to meet the XRechnung rules as well (check_invoice with rules \"xrechnung\"), and the attached XML is xrechnung.xml, which declares XRechnung 3.0.","inputSchema":{"properties":{"invoice":{"additionalProperties":false,"description":"Invoice data as printed on the PDF. Copy values exactly; leave out anything the document does not state.","properties":{"bic":{"description":"BIC of the seller bank.","type":"string"},"buyer":{"additionalProperties":false,"properties":{"city":{"description":"City.","type":"string"},"contactName":{"description":"Contact person.","type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. DE, AT, FR.","pattern":"^[A-Z]{2}$","type":"string"},"email":{"description":"E-mail address.","type":"string"},"name":{"description":"Full legal name of the buyer (the invoice recipient).","type":"string"},"phone":{"description":"Phone number.","type":"string"},"postalCode":{"description":"Postal code.","type":"string"},"street":{"description":"Street and house number.","type":"string"},"vatId":{"description":"VAT identification number of the buyer (the invoice recipient) with country prefix, e.g. DE123456789.","type":"string"}},"required":["name","country"],"type":"object"},"buyerReference":{"description":"Reference given by the buyer (Leitweg-ID for German public bodies).","type":"string"},"currency":{"description":"ISO 4217 currency code. Default EUR.","pattern":"^[A-Z]{3}$","type":"string"},"deliveryCountry":{"description":"Country the goods went to, as ISO 3166-1 alpha-2 code. State it for an intra-community supply (category K) that did not go to the country of the buyer.","pattern":"^[A-Z]{2}$","type":"string"},"deliveryDate":{"description":"Date of delivery or service. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"dueDate":{"description":"Payment due date. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"iban":{"description":"IBAN of the seller.","type":"string"},"issueDate":{"description":"Invoice date. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"lines":{"items":{"additionalProperties":false,"properties":{"description":{"description":"Further description.","type":"string"},"discount":{"additionalProperties":false,"description":"Discount on this line as printed: a percentage of quantity x unit price, an amount, or both.","properties":{"amount":{"description":"Discount amount. Negative on a line with a negative quantity.","type":"number"},"percent":{"description":"Percentage, e.g. 10.","type":"number"},"reason":{"description":"Reason as printed, e.g. \"Treuerabatt\".","type":"string"}},"type":"object"},"name":{"description":"Item or service name.","type":"string"},"netAmount":{"description":"Net line total as printed.","type":"number"},"quantity":{"description":"Quantity.","type":"number"},"unit":{"description":"UN/ECE Rec. 20 unit code: C62 piece (default), HUR hour, DAY day, MON month, KGM kilogram, MTR metre, LTR litre, LS lump sum.","type":"string"},"unitPrice":{"description":"Net price per unit, without VAT.","type":"number"},"vatCategory":{"description":"S standard rate (default), Z zero rated, E exempt, AE reverse charge, K intra-community supply, G export, O not subject to VAT.","enum":["S","Z","E","AE","K","G","O"],"type":"string"},"vatRate":{"description":"VAT rate in percent, e.g. 19.","type":"number"}},"required":["name","quantity","unitPrice","vatRate"],"type":"object"},"minItems":1,"type":"array"},"note":{"description":"Free text note.","type":"string"},"number":{"description":"Invoice number.","type":"string"},"orderReference":{"description":"Purchase order number.","type":"string"},"paymentTerms":{"description":"Payment terms as printed, e.g. \"Payable within 14 days\".","type":"string"},"periodEnd":{"description":"End of the service period. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"periodStart":{"description":"Start of the service period, if a period is given instead of a single date. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"precedingInvoiceDate":{"description":"Date of that earlier invoice. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"precedingInvoiceNumber":{"description":"Number of the invoice this document corrects or cancels.","type":"string"},"prepaidAmount":{"description":"Amount already paid.","type":"number"},"seller":{"additionalProperties":false,"properties":{"city":{"description":"City.","type":"string"},"contactName":{"description":"Contact person.","type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. DE, AT, FR.","pattern":"^[A-Z]{2}$","type":"string"},"email":{"description":"E-mail address.","type":"string"},"name":{"description":"Full legal name of the seller (the company that issued the invoice).","type":"string"},"phone":{"description":"Phone number.","type":"string"},"postalCode":{"description":"Postal code.","type":"string"},"street":{"description":"Street and house number.","type":"string"},"taxNumber":{"description":"Local tax number of the seller (German Steuernummer).","type":"string"},"vatId":{"description":"VAT identification number of the seller (the company that issued the invoice) with country prefix, e.g. DE123456789.","type":"string"}},"required":["name","country"],"type":"object"},"totals":{"additionalProperties":false,"description":"Totals exactly as printed on the invoice.","properties":{"due":{"description":"Amount due for payment.","type":"number"},"gross":{"description":"Total including VAT.","type":"number"},"net":{"description":"Total without VAT.","type":"number"},"vat":{"description":"Total VAT.","type":"number"}},"type":"object"},"typeCode":{"description":"380 invoice (default), 381 credit note, 384 corrected invoice, 389 self-billed invoice, 326 partial invoice, 386 prepayment invoice.","enum":["326","380","381","384","386","389"],"type":"string"},"vatExemptionReason":{"description":"Printed reason why no VAT is charged (reverse charge, small business, export ...).","type":"string"}},"required":["number","issueDate","seller","buyer","lines"],"title":"Invoice","type":"object"},"output_path":{"description":"Where to write the e-invoice. Default: <name>.einvoice.pdf next to the input. Absolute path.","type":"string"},"overwrite":{"description":"Replace output_path if it exists. Default false.","type":"boolean"},"pdf_path":{"description":"The invoice PDF. Absolute path.","type":"string"},"profile":{"description":"The profile of the XML. Default en16931.","enum":["en16931","xrechnung"],"type":"string"}},"required":["pdf_path","invoice"],"type":"object"},"name":"create_einvoice","title":"Create the e-invoice"},{"annotations":{"destructiveHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Writes the invoice data as an XRechnung 3.0, the XML German public bodies ask for: one XML file, without a PDF. Call it only after check_invoice with rules \"xrechnung\" reports no errors and the user has confirmed the data. Returns { output_path, findings, totals }; with errors in the data nothing is written and the findings say what to fix.","inputSchema":{"properties":{"invoice":{"additionalProperties":false,"description":"Invoice data as printed on the PDF. Copy values exactly; leave out anything the document does not state.","properties":{"bic":{"description":"BIC of the seller bank.","type":"string"},"buyer":{"additionalProperties":false,"properties":{"city":{"description":"City.","type":"string"},"contactName":{"description":"Contact person.","type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. DE, AT, FR.","pattern":"^[A-Z]{2}$","type":"string"},"email":{"description":"E-mail address.","type":"string"},"name":{"description":"Full legal name of the buyer (the invoice recipient).","type":"string"},"phone":{"description":"Phone number.","type":"string"},"postalCode":{"description":"Postal code.","type":"string"},"street":{"description":"Street and house number.","type":"string"},"vatId":{"description":"VAT identification number of the buyer (the invoice recipient) with country prefix, e.g. DE123456789.","type":"string"}},"required":["name","country"],"type":"object"},"buyerReference":{"description":"Reference given by the buyer (Leitweg-ID for German public bodies).","type":"string"},"currency":{"description":"ISO 4217 currency code. Default EUR.","pattern":"^[A-Z]{3}$","type":"string"},"deliveryCountry":{"description":"Country the goods went to, as ISO 3166-1 alpha-2 code. State it for an intra-community supply (category K) that did not go to the country of the buyer.","pattern":"^[A-Z]{2}$","type":"string"},"deliveryDate":{"description":"Date of delivery or service. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"dueDate":{"description":"Payment due date. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"iban":{"description":"IBAN of the seller.","type":"string"},"issueDate":{"description":"Invoice date. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"lines":{"items":{"additionalProperties":false,"properties":{"description":{"description":"Further description.","type":"string"},"discount":{"additionalProperties":false,"description":"Discount on this line as printed: a percentage of quantity x unit price, an amount, or both.","properties":{"amount":{"description":"Discount amount. Negative on a line with a negative quantity.","type":"number"},"percent":{"description":"Percentage, e.g. 10.","type":"number"},"reason":{"description":"Reason as printed, e.g. \"Treuerabatt\".","type":"string"}},"type":"object"},"name":{"description":"Item or service name.","type":"string"},"netAmount":{"description":"Net line total as printed.","type":"number"},"quantity":{"description":"Quantity.","type":"number"},"unit":{"description":"UN/ECE Rec. 20 unit code: C62 piece (default), HUR hour, DAY day, MON month, KGM kilogram, MTR metre, LTR litre, LS lump sum.","type":"string"},"unitPrice":{"description":"Net price per unit, without VAT.","type":"number"},"vatCategory":{"description":"S standard rate (default), Z zero rated, E exempt, AE reverse charge, K intra-community supply, G export, O not subject to VAT.","enum":["S","Z","E","AE","K","G","O"],"type":"string"},"vatRate":{"description":"VAT rate in percent, e.g. 19.","type":"number"}},"required":["name","quantity","unitPrice","vatRate"],"type":"object"},"minItems":1,"type":"array"},"note":{"description":"Free text note.","type":"string"},"number":{"description":"Invoice number.","type":"string"},"orderReference":{"description":"Purchase order number.","type":"string"},"paymentTerms":{"description":"Payment terms as printed, e.g. \"Payable within 14 days\".","type":"string"},"periodEnd":{"description":"End of the service period. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"periodStart":{"description":"Start of the service period, if a period is given instead of a single date. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"precedingInvoiceDate":{"description":"Date of that earlier invoice. Format YYYY-MM-DD.","pattern":"^\\d{4}-\\d{2}-\\d{2}$","type":"string"},"precedingInvoiceNumber":{"description":"Number of the invoice this document corrects or cancels.","type":"string"},"prepaidAmount":{"description":"Amount already paid.","type":"number"},"seller":{"additionalProperties":false,"properties":{"city":{"description":"City.","type":"string"},"contactName":{"description":"Contact person.","type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country code, e.g. DE, AT, FR.","pattern":"^[A-Z]{2}$","type":"string"},"email":{"description":"E-mail address.","type":"string"},"name":{"description":"Full legal name of the seller (the company that issued the invoice).","type":"string"},"phone":{"description":"Phone number.","type":"string"},"postalCode":{"description":"Postal code.","type":"string"},"street":{"description":"Street and house number.","type":"string"},"taxNumber":{"description":"Local tax number of the seller (German Steuernummer).","type":"string"},"vatId":{"description":"VAT identification number of the seller (the company that issued the invoice) with country prefix, e.g. DE123456789.","type":"string"}},"required":["name","country"],"type":"object"},"totals":{"additionalProperties":false,"description":"Totals exactly as printed on the invoice.","properties":{"due":{"description":"Amount due for payment.","type":"number"},"gross":{"description":"Total including VAT.","type":"number"},"net":{"description":"Total without VAT.","type":"number"},"vat":{"description":"Total VAT.","type":"number"}},"type":"object"},"typeCode":{"description":"380 invoice (default), 381 credit note, 384 corrected invoice, 389 self-billed invoice, 326 partial invoice, 386 prepayment invoice.","enum":["326","380","381","384","386","389"],"type":"string"},"vatExemptionReason":{"description":"Printed reason why no VAT is charged (reverse charge, small business, export ...).","type":"string"}},"required":["number","issueDate","seller","buyer","lines"],"title":"Invoice","type":"object"},"output_path":{"description":"Where to write the XML file. Absolute path.","type":"string"},"overwrite":{"description":"Replace output_path if it exists. Default false.","type":"boolean"},"syntax":{"description":"The XML syntax: ubl (default) or cii, UN/CEFACT Cross Industry Invoice. XRechnung allows both.","enum":["ubl","cii"],"type":"string"}},"required":["invoice","output_path"],"type":"object"},"name":"create_xrechnung","title":"Create an XRechnung"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Returns the invoice XML embedded in a ZUGFeRD / Factur-X PDF. Fails if the PDF carries none.","inputSchema":{"properties":{"pdf_path":{"description":"The e-invoice PDF. Absolute path.","type":"string"}},"required":["pdf_path"],"type":"object"},"name":"read_einvoice_xml","title":"Read the XML of an e-invoice"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Checks an existing e-invoice PDF (ZUGFeRD / Factur-X), issued or received. Returns { isEInvoice, profile, invoice, totals, findings }: whether the PDF carries invoice XML in an EN 16931 profile, the data read from that XML, the totals calculated from its lines, and findings on missing data, arithmetic, PDF/A-3 and values of the XML that the text of the PDF does not show (\"not-in-pdf\"). A plausibility check, not a full EN 16931 Schematron or PDF/A validation.","inputSchema":{"properties":{"pdf_path":{"description":"The e-invoice PDF. Absolute path.","type":"string"}},"required":["pdf_path"],"type":"object"},"name":"validate_einvoice","title":"Check an existing e-invoice"}]}}}
