Server definition
- Hash
- sha256:5c078458c8b5c59b50764a52d350d3f55b41264174a7400316903dd6b0037e8a
- What it is
- What a remote MCP server returned when asked what it offers: 6 tools
The blob, as servednamed by its sha256
{
"instructions": "finisma erzeugt und prüft elektronische Rechnungen (ZUGFeRD/Factur-X, EN 16931). verify_zugferd, check_vat_id (Live-Prüfung gegen VIES) und check_peppol_participant (Peppol-Erreichbarkeit per SML/SMP) sind kostenlos nutzbar — damit lässt sich ein Geschäftspartner vor dem Rechnungsversand prüfen. create_zugferd und extract_invoice erfordern ein Konto mit aktivem Abo oder Guthaben (Credits). Zugang wahlweise über OAuth (Konto verbinden) oder einen API-Key (Authorization: Bearer fnsm_…), erstellt unter https://finisma.de/konto. PDF-Dateien können direkt Base64-kodiert übergeben werden (pdf_base64). Chat-Clients, die eine angehängte Datei nicht zuverlässig als Base64 an ein Tool übergeben können, rufen zuerst request_upload_link auf und nutzen die zurückgegebene upload_id stattdessen. Die fertige ZUGFeRD-Rechnung kommt bei diesem Kanal als Download-Link statt als Base64-Blob zurück. Korrekturschleife (empfohlener Ablauf, statt invoice selbst aus der PDF zu raten): 1) request_upload_link, Nutzer lädt die PDF hoch. 2) extract_invoice mit der upload_id liefert die Rechnungsdaten (invoice) plus validation_issues. Felder mit dem Wert 'KORRIGIEREN' (Text) oder '1900-01-01' (Datum) konnten nicht sicher gelesen werden und stehen als Issue mit Code EXTRACTION_UNCERTAIN drin — diese und alle severity='error'-Issues dem Nutzer zeigen und korrigieren lassen. 3) create_zugferd mit derselben upload_id und dem korrigierten invoice aufrufen. Enthalten die Daten weiterhin Fehler, liefert die Antwort erneut strukturierte issues statt einer Datei — Schritt 2/3 wiederholen, bis keine Fehler mehr da sind.",
"tools": [
{
"description": "Prüft per SML/SMP-Lookup, ob ein Geschäftspartner im Peppol-Netz erreichbar ist, und listet seine registrierten Dokumenttypen. Akzeptiert eine volle Kennung (\"0088:4399901550926\"), eine nackte GLN, eine deutsche USt-IdNr. oder eine Leitweg-ID. registered:false ist ein normales Ergebnis, kein Fehler. Kostenlos.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"participant": {
"description": "Kennung des Partners: volle Peppol-Kennung (\"0088:4399901550926\"), nackte GLN, deutsche USt-IdNr. (\"DE123456789\") oder Leitweg-ID (\"991-33333TEST-33\").",
"type": "string"
}
},
"required": [
"participant"
],
"type": "object"
},
"name": "check_peppol_participant",
"outputSchema": {
"properties": {
"cached": {
"type": "boolean"
},
"checkedAt": {
"description": "Zeitpunkt der echten Prüfung (ISO 8601)",
"type": "string"
},
"countryCode": {
"type": [
"string",
"null"
]
},
"documentTypes": {
"description": "registrierte Dokumenttypen laut SMP (leer bei registered:false)",
"items": {
"type": "string"
},
"type": "array"
},
"input": {
"type": "string"
},
"name": {
"description": "Name laut Peppol Directory, falls gelistet",
"type": [
"string",
"null"
]
},
"participantId": {
"description": "volle Kennung inkl. Meta-Schema, z. B. \"iso6523-actorid-upis::0088:4399901550926\"",
"type": "string"
},
"registered": {
"type": "boolean"
},
"scheme": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"input",
"participantId",
"scheme",
"value",
"registered",
"documentTypes",
"checkedAt",
"cached"
],
"type": "object"
}
},
{
"description": "Prüft eine USt-IdNr. live gegen VIES (EU-Bestätigungsverfahren): Gültigkeit plus Firmenname, sofern der Mitgliedsstaat ihn herausgibt. Antwort-Status ist valid, invalid oder unavailable (VIES nicht erreichbar — keine Aussage). Kostenlos.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"vat_id": {
"description": "Die zu prüfende USt-IdNr. mit Länderpräfix, z. B. \"DE325821677\" oder \"ATU12345675\". Leerzeichen, Punkte und Bindestriche werden toleriert.",
"type": "string"
}
},
"required": [
"vat_id"
],
"type": "object"
},
"name": "check_vat_id",
"outputSchema": {
"properties": {
"cached": {
"type": "boolean"
},
"checkedAt": {
"description": "Zeitpunkt der echten Prüfung (ISO 8601)",
"type": "string"
},
"countryCode": {
"type": "string"
},
"name": {
"description": "Firmenname laut Mitgliedsstaat, oft nicht herausgegeben",
"type": [
"string",
"null"
]
},
"status": {
"enum": [
"valid",
"invalid",
"unavailable"
],
"type": "string"
},
"vatId": {
"description": "normalisierte Nummer, wie geprüft wurde",
"type": "string"
}
},
"required": [
"vatId",
"countryCode",
"status",
"checkedAt",
"cached"
],
"type": "object"
}
},
{
"description": "Erzeugt eine ZUGFeRD-PDF aus visueller PDF und strukturierten EN-16931-Daten (kein LLM). Verletzen die Daten EN-16931-Geschäftsregeln, liefert der Remote-Kanal (Chat-Connector) strukturierte Issues statt einer Datei zurück — invoice korrigieren (siehe extract_invoice) und mit denselben Quelldaten (upload_id/pdf_base64) erneut aufrufen. Ohne aktives Abo kostenlos mit Konto (API-Key): die PDF trägt dann das finisma-Prüfsiegel als Wasserzeichen, standardmäßig bis zu 5 Rechnungen pro Tag; mit Abo ohne Wasserzeichen und ohne Tageslimit. Rabatte und Zuschläge je Position (lines[].allowanceCharges) dürfen als Prozentsatz ohne Betrag kommen: amount = round2(Menge × unitPriceNet × percent / 100); ebenso auf die ganze Rechnung (allowanceCharges): Grundbetrag ohne Angabe ist die Summe der lineNetAmount mit ratePercent. lineNetAmount, vatBreakdown und die Summen muss der Aufrufer mit diesen Beträgen rechnen. Für öffentliche Auftraggeber erzeugt invoice.profile='xrechnung' eine XRechnung 3.0 (nur als reines XML über die REST-API mit format=xml; Pflichten: Leitweg-ID in buyerReference, Verkäufer-Kontakt mit Telefon und E-Mail, payment, electronicAddress beider Parteien).",
"inputSchema": {
"additionalProperties": false,
"properties": {
"attachments": {
"description": "Optionale Anhänge (z. B. Stundennachweise). Erlaubt: PDF, PNG, JPEG, CSV, XLSX, ODS, XML; je max. 10 MB.",
"items": {
"additionalProperties": false,
"properties": {
"data_base64": {
"contentEncoding": "base64",
"description": "Dateiinhalt, Base64-kodiert (max. 10 MB).",
"type": "string"
},
"description": {
"description": "Optionale Beschreibung der rechnungsbegründenden Unterlage (BT-123), z. B. \"Stundennachweis März 2026\". Ohne Angabe steht dort der Dateiname.",
"type": "string"
},
"filename": {
"type": "string"
},
"mime_type": {
"description": "Optional; wird sonst aus der Dateiendung abgeleitet.",
"type": "string"
}
},
"required": [
"filename",
"data_base64"
],
"type": "object"
},
"type": "array"
},
"filename": {
"description": "Dateiname der erzeugten Rechnung (Standard: invoice.pdf).",
"type": "string"
},
"invoice": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"description": "Strukturierte Rechnungsdaten nach EN 16931 (wird gegen Schema und Geschäftsregeln geprüft).",
"properties": {
"allowanceCharges": {
"items": {
"additionalProperties": false,
"properties": {
"amount": {
"description": "BT-92/BT-99: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100).",
"minimum": 0,
"type": "number"
},
"basisAmount": {
"description": "BT-93/BT-100: Grundbetrag des Prozentsatzes. Ohne Angabe die Summe der lineNetAmount aller Positionen mit ratePercent (bei gemischten Kategorien desselben Satzes nur die mit categoryCode).",
"type": "number"
},
"categoryCode": {
"default": "S",
"maxLength": 12,
"type": "string"
},
"charge": {
"description": "true = Zuschlag (BG-21), false = Abzug/Nachlass (BG-20).",
"type": "boolean"
},
"percent": {
"description": "BT-94/BT-101: Prozentsatz, z. B. 2 für 2 % Nachlass.",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"ratePercent": {
"description": "BT-96/BT-103: Steuersatz in Prozent. Darf beim Prozent-Eintrag ohne basisAmount fehlen, wenn alle Positionen denselben Satz haben.",
"type": "number"
},
"reason": {
"maxLength": 200,
"type": "string"
},
"reasonCode": {
"maxLength": 10,
"type": "string"
}
},
"required": [
"charge"
],
"type": "object"
},
"maxItems": 50,
"type": "array"
},
"buyer": {
"additionalProperties": false,
"properties": {
"address": {
"additionalProperties": false,
"default": {},
"properties": {
"city": {
"maxLength": 100,
"type": "string"
},
"countryCode": {
"default": "DE",
"maxLength": 2,
"minLength": 2,
"type": "string"
},
"line1": {
"maxLength": 150,
"type": "string"
},
"line2": {
"maxLength": 150,
"type": "string"
},
"postalCode": {
"maxLength": 20,
"type": "string"
}
},
"type": "object"
},
"contact": {
"additionalProperties": false,
"properties": {
"email": {
"maxLength": 150,
"type": "string"
},
"name": {
"maxLength": 150,
"type": "string"
},
"phone": {
"maxLength": 40,
"type": "string"
}
},
"type": "object"
},
"electronicAddress": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"scheme": {
"default": "EM",
"maxLength": 10,
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"gln": {
"maxLength": 20,
"type": "string"
},
"name": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"registrationId": {
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht.",
"maxLength": 60,
"type": "string"
},
"vatId": {
"maxLength": 20,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"buyerReference": {
"maxLength": 80,
"type": "string"
},
"contractReference": {
"maxLength": 200,
"type": "string"
},
"costCenter": {
"maxLength": 60,
"type": "string"
},
"currency": {
"default": "EUR",
"maxLength": 3,
"minLength": 3,
"type": "string"
},
"delivery": {
"additionalProperties": false,
"properties": {
"address": {
"additionalProperties": false,
"properties": {
"city": {
"maxLength": 100,
"type": "string"
},
"countryCode": {
"maxLength": 2,
"minLength": 2,
"type": "string"
},
"line1": {
"maxLength": 150,
"type": "string"
},
"line2": {
"maxLength": 150,
"type": "string"
},
"postalCode": {
"maxLength": 20,
"type": "string"
}
},
"type": "object"
},
"name": {
"maxLength": 200,
"type": "string"
}
},
"type": "object"
},
"deliveryCountryCode": {
"maxLength": 2,
"minLength": 2,
"type": "string"
},
"deliveryDate": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"despatchAdviceRef": {
"maxLength": 200,
"type": "string"
},
"documentTypeCode": {
"default": "380",
"type": "string"
},
"dueDate": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"invoiceNumber": {
"maxLength": 60,
"minLength": 1,
"type": "string"
},
"invoicingPeriod": {
"additionalProperties": false,
"properties": {
"end": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"start": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
}
},
"type": "object"
},
"issueDate": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"lines": {
"items": {
"additionalProperties": false,
"properties": {
"allowanceCharges": {
"items": {
"additionalProperties": false,
"properties": {
"amount": {
"description": "BT-136/BT-141: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100).",
"minimum": 0,
"type": "number"
},
"basisAmount": {
"description": "BT-137/BT-142: Grundbetrag des Prozentsatzes. Ohne Angabe Menge × unitPriceNet der Position (je Eintrag, nicht gestaffelt).",
"type": "number"
},
"charge": {
"description": "true = Zuschlag (BG-28), false = Abzug/Rabatt (BG-27).",
"type": "boolean"
},
"percent": {
"description": "BT-138/BT-143: Prozentsatz, z. B. 10 für 10 % Rabatt.",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"reason": {
"maxLength": 200,
"type": "string"
},
"reasonCode": {
"maxLength": 10,
"type": "string"
}
},
"required": [
"charge"
],
"type": "object"
},
"maxItems": 10,
"type": "array"
},
"buyerArticleId": {
"maxLength": 200,
"type": "string"
},
"categoryCode": {
"maxLength": 12,
"type": "string"
},
"globalArticleId": {
"maxLength": 60,
"type": "string"
},
"globalArticleScheme": {
"maxLength": 10,
"pattern": "^[0-9A-Za-z]+$",
"type": "string"
},
"lineNetAmount": {
"type": "number"
},
"name": {
"maxLength": 300,
"minLength": 1,
"type": "string"
},
"quantity": {
"type": "number"
},
"sellerArticleId": {
"maxLength": 200,
"type": "string"
},
"unitCode": {
"default": "C62",
"maxLength": 12,
"type": "string"
},
"unitPriceNet": {
"type": "number"
},
"vatRatePercent": {
"type": "number"
}
},
"required": [
"name",
"quantity",
"unitPriceNet",
"vatRatePercent",
"lineNetAmount"
],
"type": "object"
},
"maxItems": 500,
"minItems": 1,
"type": "array"
},
"notes": {
"items": {
"anyOf": [
{
"maxLength": 1000,
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"subjectCode": {
"type": "string"
},
"text": {
"maxLength": 1000,
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
}
]
},
"maxItems": 20,
"type": "array"
},
"paidAmount": {
"minimum": 0,
"type": "number"
},
"payee": {
"additionalProperties": false,
"properties": {
"gln": {
"maxLength": 20,
"type": "string"
},
"name": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"registrationId": {
"maxLength": 60,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"payment": {
"additionalProperties": false,
"properties": {
"accountName": {
"maxLength": 200,
"type": "string"
},
"bic": {
"maxLength": 15,
"pattern": "^[A-Za-z0-9 ]*$",
"type": "string"
},
"creditorId": {
"maxLength": 35,
"type": "string"
},
"debitedIban": {
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$",
"type": "string"
},
"discountDays": {
"maximum": 999,
"minimum": 0,
"type": "integer"
},
"discountPercent": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"iban": {
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$",
"type": "string"
},
"mandateId": {
"maxLength": 35,
"type": "string"
},
"meansCode": {
"type": "string"
},
"reference": {
"maxLength": 140,
"type": "string"
},
"terms": {
"maxLength": 1000,
"type": "string"
}
},
"type": "object"
},
"precedingInvoiceDate": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"precedingInvoiceNumber": {
"maxLength": 60,
"type": "string"
},
"profile": {
"default": "en16931",
"enum": [
"en16931",
"xrechnung"
],
"type": "string"
},
"projectReference": {
"maxLength": 200,
"type": "string"
},
"purchaseOrderReference": {
"maxLength": 60,
"type": "string"
},
"receivingAdviceRef": {
"maxLength": 200,
"type": "string"
},
"seller": {
"additionalProperties": false,
"properties": {
"address": {
"additionalProperties": false,
"default": {},
"properties": {
"city": {
"maxLength": 100,
"type": "string"
},
"countryCode": {
"default": "DE",
"maxLength": 2,
"minLength": 2,
"type": "string"
},
"line1": {
"maxLength": 150,
"type": "string"
},
"line2": {
"maxLength": 150,
"type": "string"
},
"postalCode": {
"maxLength": 20,
"type": "string"
}
},
"type": "object"
},
"contact": {
"additionalProperties": false,
"properties": {
"email": {
"maxLength": 150,
"type": "string"
},
"name": {
"maxLength": 150,
"type": "string"
},
"phone": {
"maxLength": 40,
"type": "string"
}
},
"type": "object"
},
"electronicAddress": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"scheme": {
"default": "EM",
"maxLength": 10,
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"gln": {
"maxLength": 20,
"type": "string"
},
"name": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"registrationId": {
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht.",
"maxLength": 60,
"type": "string"
},
"vatId": {
"maxLength": 20,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"taxCurrencyCode": {
"maxLength": 3,
"minLength": 3,
"type": "string"
},
"totalGross": {
"type": "number"
},
"totalNet": {
"type": "number"
},
"totalVat": {
"type": "number"
},
"totalVatInTaxCurrency": {
"type": "number"
},
"vatBreakdown": {
"items": {
"additionalProperties": false,
"properties": {
"basisAmount": {
"type": "number"
},
"categoryCode": {
"default": "S",
"maxLength": 12,
"type": "string"
},
"exemptionReason": {
"maxLength": 500,
"type": "string"
},
"exemptionReasonCode": {
"maxLength": 30,
"type": "string"
},
"ratePercent": {
"type": "number"
},
"taxAmount": {
"type": "number"
}
},
"required": [
"ratePercent",
"basisAmount",
"taxAmount"
],
"type": "object"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
}
},
"required": [
"invoiceNumber",
"issueDate",
"seller",
"buyer",
"lines",
"vatBreakdown",
"totalNet",
"totalVat",
"totalGross"
],
"type": "object"
},
"pdf_base64": {
"contentEncoding": "base64",
"contentMediaType": "application/pdf",
"description": "Die visuelle Rechnungs-PDF, Base64-kodiert (max. 25 MB). In sie wird das CII-XML eingebettet. Alternativ 'upload_id' angeben. Chat-Clients, die eine angehängte Datei nicht zuverlässig als Base64 übergeben können, rufen zuerst request_upload_link auf.",
"type": "string"
},
"upload_id": {
"description": "Referenz auf eine zuvor über request_upload_link hochgeladene Datei, anstelle von pdf_base64. Genau eines von beiden angeben.",
"type": "string"
}
},
"required": [
"invoice"
],
"type": "object"
},
"name": "create_zugferd",
"outputSchema": {
"additionalProperties": false,
"properties": {
"bytes": {
"description": "Größe der erzeugten PDF in Bytes.",
"type": "integer"
},
"download_url": {
"description": "Kurzlebiger Download-Link zur erzeugten PDF. Nur gesetzt, wenn die Eingabe als 'upload_id' kam (Chat-Client-Fallback).",
"type": "string"
},
"expires_at": {
"description": "ISO-8601-Zeitpunkt, ab dem download_url verfällt (nur mit download_url gesetzt).",
"type": "string"
},
"issues": {
"description": "Nur gesetzt, wenn die übergebenen Rechnungsdaten EN-16931-Geschäftsregeln verletzen: es wurde keine Datei erzeugt (Korrekturschleife, T20). Felder anhand der Issues korrigieren und create_zugferd mit denselben Quelldaten (upload_id/pdf_base64) und dem korrigierten invoice erneut aufrufen.",
"items": {
"properties": {
"code": {
"description": "Maschinencode, z. B. \"BR-CO-26\" oder \"EXTRACTION_UNCERTAIN\".",
"type": "string"
},
"message": {
"description": "Deutsche Fehlermeldung.",
"type": "string"
},
"path": {
"description": "Punkt-Pfad ins Invoice-Objekt, z. B. \"seller.vatId\".",
"type": "string"
},
"severity": {
"enum": [
"error",
"warning"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity"
],
"type": "object"
},
"type": "array"
},
"pdf_base64": {
"contentEncoding": "base64",
"contentMediaType": "application/pdf",
"description": "Die erzeugte ZUGFeRD-Rechnung (PDF/A-3 mit eingebettetem CII-XML). Nur gesetzt, wenn die Eingabe als 'pdf_base64' kam; wurde 'upload_id' verwendet, steht stattdessen download_url im Ergebnis.",
"type": "string"
},
"watermarked": {
"description": "true, wenn die PDF aus dem kostenlosen Tageskontingent stammt und das finisma-Prüfsiegel als Wasserzeichen trägt (Aufruf ohne aktives Abo).",
"type": "boolean"
}
},
"required": [],
"type": "object"
}
},
{
"description": "Extrahiert EN-16931-Rechnungsdaten aus einer hochgeladenen PDF (Formularfelder) plus Validierungs-Issues, als Korrekturschritt vor create_zugferd: Felder und Issues dem Nutzer zeigen, korrigieren lassen, danach create_zugferd mit dem korrigierten invoice und derselben upload_id aufrufen. Unsichere Felder stehen als Platzhalter 'KORRIGIEREN' (Text) bzw. '1900-01-01' (Datum) drin und werden als Issue mit Code EXTRACTION_UNCERTAIN gemeldet — diese Felder müssen vor create_zugferd korrigiert werden. Enthält die PDF bereits eine eingebettete E-Rechnung (ZUGFeRD/Factur-X), kommen die Felder deterministisch aus der XML (source='xml') statt aus einer Sprachmodell-Lesung des Druckbilds. Erfordert ein Konto mit aktivem Abo oder Guthaben.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"pdf_base64": {
"contentEncoding": "base64",
"contentMediaType": "application/pdf",
"description": "Die zu extrahierende PDF-Rechnung, Base64-kodiert (max. 25 MB). Alternativ 'upload_id' angeben. Chat-Clients, die eine angehängte Datei nicht zuverlässig als Base64 übergeben können, rufen zuerst request_upload_link auf.",
"type": "string"
},
"upload_id": {
"description": "Referenz auf eine zuvor über request_upload_link hochgeladene Datei, anstelle von pdf_base64. Genau eines von beiden angeben. Wird im Ergebnis erneut zurückgegeben und kann anschließend bei create_zugferd als 'upload_id' verwendet werden, damit dieselbe Quell-PDF eingebettet wird.",
"type": "string"
}
},
"type": "object"
},
"name": "extract_invoice",
"outputSchema": {
"additionalProperties": false,
"properties": {
"expires_at": {
"description": "ISO-8601-Zeitpunkt, ab dem upload_id verfällt. Danach erneut request_upload_link und extract_invoice aufrufen.",
"type": "string"
},
"invoice": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"description": "Extrahierte EN-16931-Rechnungsdaten (Formularfelder). Vor create_zugferd prüfen und korrigieren, insbesondere Felder mit dem Wert 'KORRIGIEREN' bzw. '1900-01-01'.",
"properties": {
"allowanceCharges": {
"items": {
"additionalProperties": false,
"properties": {
"amount": {
"description": "BT-92/BT-99: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100).",
"minimum": 0,
"type": "number"
},
"basisAmount": {
"description": "BT-93/BT-100: Grundbetrag des Prozentsatzes. Ohne Angabe die Summe der lineNetAmount aller Positionen mit ratePercent (bei gemischten Kategorien desselben Satzes nur die mit categoryCode).",
"type": "number"
},
"categoryCode": {
"default": "S",
"maxLength": 12,
"type": "string"
},
"charge": {
"description": "true = Zuschlag (BG-21), false = Abzug/Nachlass (BG-20).",
"type": "boolean"
},
"percent": {
"description": "BT-94/BT-101: Prozentsatz, z. B. 2 für 2 % Nachlass.",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"ratePercent": {
"description": "BT-96/BT-103: Steuersatz in Prozent. Darf beim Prozent-Eintrag ohne basisAmount fehlen, wenn alle Positionen denselben Satz haben.",
"type": "number"
},
"reason": {
"maxLength": 200,
"type": "string"
},
"reasonCode": {
"maxLength": 10,
"type": "string"
}
},
"required": [
"charge"
],
"type": "object"
},
"maxItems": 50,
"type": "array"
},
"buyer": {
"additionalProperties": false,
"properties": {
"address": {
"additionalProperties": false,
"default": {},
"properties": {
"city": {
"maxLength": 100,
"type": "string"
},
"countryCode": {
"default": "DE",
"maxLength": 2,
"minLength": 2,
"type": "string"
},
"line1": {
"maxLength": 150,
"type": "string"
},
"line2": {
"maxLength": 150,
"type": "string"
},
"postalCode": {
"maxLength": 20,
"type": "string"
}
},
"type": "object"
},
"contact": {
"additionalProperties": false,
"properties": {
"email": {
"maxLength": 150,
"type": "string"
},
"name": {
"maxLength": 150,
"type": "string"
},
"phone": {
"maxLength": 40,
"type": "string"
}
},
"type": "object"
},
"electronicAddress": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"scheme": {
"default": "EM",
"maxLength": 10,
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"gln": {
"maxLength": 20,
"type": "string"
},
"name": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"registrationId": {
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht.",
"maxLength": 60,
"type": "string"
},
"vatId": {
"maxLength": 20,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"buyerReference": {
"maxLength": 80,
"type": "string"
},
"contractReference": {
"maxLength": 200,
"type": "string"
},
"costCenter": {
"maxLength": 60,
"type": "string"
},
"currency": {
"default": "EUR",
"maxLength": 3,
"minLength": 3,
"type": "string"
},
"delivery": {
"additionalProperties": false,
"properties": {
"address": {
"additionalProperties": false,
"properties": {
"city": {
"maxLength": 100,
"type": "string"
},
"countryCode": {
"maxLength": 2,
"minLength": 2,
"type": "string"
},
"line1": {
"maxLength": 150,
"type": "string"
},
"line2": {
"maxLength": 150,
"type": "string"
},
"postalCode": {
"maxLength": 20,
"type": "string"
}
},
"type": "object"
},
"name": {
"maxLength": 200,
"type": "string"
}
},
"type": "object"
},
"deliveryCountryCode": {
"maxLength": 2,
"minLength": 2,
"type": "string"
},
"deliveryDate": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"despatchAdviceRef": {
"maxLength": 200,
"type": "string"
},
"documentTypeCode": {
"default": "380",
"type": "string"
},
"dueDate": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"invoiceNumber": {
"maxLength": 60,
"minLength": 1,
"type": "string"
},
"invoicingPeriod": {
"additionalProperties": false,
"properties": {
"end": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"start": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
}
},
"type": "object"
},
"issueDate": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"lines": {
"items": {
"additionalProperties": false,
"properties": {
"allowanceCharges": {
"items": {
"additionalProperties": false,
"properties": {
"amount": {
"description": "BT-136/BT-141: Betrag ohne Vorzeichen. Darf fehlen, wenn percent gesetzt ist: dann gilt round2(basisAmount × percent / 100).",
"minimum": 0,
"type": "number"
},
"basisAmount": {
"description": "BT-137/BT-142: Grundbetrag des Prozentsatzes. Ohne Angabe Menge × unitPriceNet der Position (je Eintrag, nicht gestaffelt).",
"type": "number"
},
"charge": {
"description": "true = Zuschlag (BG-28), false = Abzug/Rabatt (BG-27).",
"type": "boolean"
},
"percent": {
"description": "BT-138/BT-143: Prozentsatz, z. B. 10 für 10 % Rabatt.",
"maximum": 100,
"minimum": 0,
"type": "number"
},
"reason": {
"maxLength": 200,
"type": "string"
},
"reasonCode": {
"maxLength": 10,
"type": "string"
}
},
"required": [
"charge"
],
"type": "object"
},
"maxItems": 10,
"type": "array"
},
"buyerArticleId": {
"maxLength": 200,
"type": "string"
},
"categoryCode": {
"maxLength": 12,
"type": "string"
},
"globalArticleId": {
"maxLength": 60,
"type": "string"
},
"globalArticleScheme": {
"maxLength": 10,
"pattern": "^[0-9A-Za-z]+$",
"type": "string"
},
"lineNetAmount": {
"type": "number"
},
"name": {
"maxLength": 300,
"minLength": 1,
"type": "string"
},
"quantity": {
"type": "number"
},
"sellerArticleId": {
"maxLength": 200,
"type": "string"
},
"unitCode": {
"default": "C62",
"maxLength": 12,
"type": "string"
},
"unitPriceNet": {
"type": "number"
},
"vatRatePercent": {
"type": "number"
}
},
"required": [
"name",
"quantity",
"unitPriceNet",
"vatRatePercent",
"lineNetAmount"
],
"type": "object"
},
"maxItems": 500,
"minItems": 1,
"type": "array"
},
"notes": {
"items": {
"anyOf": [
{
"maxLength": 1000,
"type": "string"
},
{
"additionalProperties": false,
"properties": {
"subjectCode": {
"type": "string"
},
"text": {
"maxLength": 1000,
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
}
]
},
"maxItems": 20,
"type": "array"
},
"paidAmount": {
"minimum": 0,
"type": "number"
},
"payee": {
"additionalProperties": false,
"properties": {
"gln": {
"maxLength": 20,
"type": "string"
},
"name": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"registrationId": {
"maxLength": 60,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"payment": {
"additionalProperties": false,
"properties": {
"accountName": {
"maxLength": 200,
"type": "string"
},
"bic": {
"maxLength": 15,
"pattern": "^[A-Za-z0-9 ]*$",
"type": "string"
},
"creditorId": {
"maxLength": 35,
"type": "string"
},
"debitedIban": {
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$",
"type": "string"
},
"discountDays": {
"maximum": 999,
"minimum": 0,
"type": "integer"
},
"discountPercent": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"iban": {
"maxLength": 40,
"pattern": "^[A-Za-z0-9 ]*$",
"type": "string"
},
"mandateId": {
"maxLength": 35,
"type": "string"
},
"meansCode": {
"type": "string"
},
"reference": {
"maxLength": 140,
"type": "string"
},
"terms": {
"maxLength": 1000,
"type": "string"
}
},
"type": "object"
},
"precedingInvoiceDate": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"type": "string"
},
"precedingInvoiceNumber": {
"maxLength": 60,
"type": "string"
},
"profile": {
"default": "en16931",
"enum": [
"en16931",
"xrechnung"
],
"type": "string"
},
"projectReference": {
"maxLength": 200,
"type": "string"
},
"purchaseOrderReference": {
"maxLength": 60,
"type": "string"
},
"receivingAdviceRef": {
"maxLength": 200,
"type": "string"
},
"seller": {
"additionalProperties": false,
"properties": {
"address": {
"additionalProperties": false,
"default": {},
"properties": {
"city": {
"maxLength": 100,
"type": "string"
},
"countryCode": {
"default": "DE",
"maxLength": 2,
"minLength": 2,
"type": "string"
},
"line1": {
"maxLength": 150,
"type": "string"
},
"line2": {
"maxLength": 150,
"type": "string"
},
"postalCode": {
"maxLength": 20,
"type": "string"
}
},
"type": "object"
},
"contact": {
"additionalProperties": false,
"properties": {
"email": {
"maxLength": 150,
"type": "string"
},
"name": {
"maxLength": 150,
"type": "string"
},
"phone": {
"maxLength": 40,
"type": "string"
}
},
"type": "object"
},
"electronicAddress": {
"additionalProperties": false,
"properties": {
"id": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"scheme": {
"default": "EM",
"maxLength": 10,
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"gln": {
"maxLength": 20,
"type": "string"
},
"name": {
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"registrationId": {
"description": "BT-30 (Verkäufer) / BT-47 (Käufer): Handelsregisternummer bzw. Registerkennung der Partei, z. B. \"HRB 12345, Amtsgericht München\". Nur angeben, wenn sie auf der Rechnung steht. Beim Käufer reicht sie bei Reverse Charge (Kategorie AE) statt der USt-IdNr., bei innergemeinschaftlicher Lieferung (K) nicht.",
"maxLength": 60,
"type": "string"
},
"vatId": {
"maxLength": 20,
"type": "string"
}
},
"required": [
"name"
],
"type": "object"
},
"taxCurrencyCode": {
"maxLength": 3,
"minLength": 3,
"type": "string"
},
"totalGross": {
"type": "number"
},
"totalNet": {
"type": "number"
},
"totalVat": {
"type": "number"
},
"totalVatInTaxCurrency": {
"type": "number"
},
"vatBreakdown": {
"items": {
"additionalProperties": false,
"properties": {
"basisAmount": {
"type": "number"
},
"categoryCode": {
"default": "S",
"maxLength": 12,
"type": "string"
},
"exemptionReason": {
"maxLength": 500,
"type": "string"
},
"exemptionReasonCode": {
"maxLength": 30,
"type": "string"
},
"ratePercent": {
"type": "number"
},
"taxAmount": {
"type": "number"
}
},
"required": [
"ratePercent",
"basisAmount",
"taxAmount"
],
"type": "object"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
}
},
"required": [
"invoiceNumber",
"issueDate",
"seller",
"buyer",
"lines",
"vatBreakdown",
"totalNet",
"totalVat",
"totalGross"
],
"type": "object"
},
"source": {
"description": "Herkunft der Felder: 'xml' = deterministisch aus der in der PDF eingebetteten E-Rechnung übernommen, 'llm' = per Sprachmodell aus dem Druckbild extrahiert.",
"enum": [
"xml",
"llm"
],
"type": "string"
},
"upload_id": {
"description": "Bei create_zugferd als 'upload_id' übergeben, damit dieselbe Quell-PDF eingebettet wird.",
"type": "string"
},
"validation_issues": {
"description": "Offene Probleme der extrahierten Daten. severity='error' blockiert create_zugferd (dort wird dieselbe Prüfung erneut ausgeführt), 'warning' nicht.",
"items": {
"properties": {
"code": {
"description": "Maschinencode, z. B. \"BR-CO-26\" oder \"EXTRACTION_UNCERTAIN\".",
"type": "string"
},
"message": {
"description": "Deutsche Fehlermeldung.",
"type": "string"
},
"path": {
"description": "Punkt-Pfad ins Invoice-Objekt, z. B. \"seller.vatId\".",
"type": "string"
},
"severity": {
"enum": [
"error",
"warning"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"invoice",
"validation_issues",
"upload_id",
"expires_at",
"source"
],
"type": "object"
}
},
{
"description": "Erzeugt einen kurzlebigen Upload-Link für eine PDF-Rechnung. Nötig für Chat-Clients (ChatGPT, Claude), die eine angehängte Datei nicht zuverlässig als pdf_base64 an ein Tool übergeben können. Zwei Wege: Der Nutzer lädt die PDF über upload_url im Browser hoch, ODER der Client mit Shell und Netzzugriff lädt sie selbst hoch, per POST als Multipart-Feld 'file' an upload_api_url (curl -F \"[email protected]\"). Für den direkten Weg muss die Domain finisma.de erreichbar sein; in Claude-Umgebungen mit Netz-Sandbox heißt das, finisma.de in der Domain-Allowlist einzutragen. Die zurückgegebene upload_id kann danach bei create_zugferd/verify_zugferd anstelle von pdf_base64 verwendet werden.",
"inputSchema": {
"additionalProperties": false,
"properties": {},
"type": "object"
},
"name": "request_upload_link",
"outputSchema": {
"additionalProperties": false,
"properties": {
"expires_at": {
"description": "ISO-8601-Zeitpunkt, ab dem der Link verfällt.",
"type": "string"
},
"upload_api_url": {
"description": "Direkter Upload-Endpunkt für Clients mit Netzzugriff auf finisma.de: die PDF per POST als Multipart-Feld 'file' hierher senden, dann entfällt der Browser-Schritt.",
"type": "string"
},
"upload_id": {
"description": "An create_zugferd/verify_zugferd als 'upload_id' übergeben.",
"type": "string"
},
"upload_url": {
"description": "Dem Nutzer zum Öffnen im Browser geben, dort die PDF hochladen.",
"type": "string"
}
},
"required": [
"upload_id",
"upload_url",
"upload_api_url",
"expires_at"
],
"type": "object"
}
},
{
"description": "Prüft eine ZUGFeRD-/Factur-X-PDF: Struktur, EN-16931-Regeln, PDF/A-3-Anhänge.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"pdf_base64": {
"contentEncoding": "base64",
"contentMediaType": "application/pdf",
"description": "Die zu prüfende PDF-Datei, Base64-kodiert (max. 25 MB). Alternativ 'upload_id' angeben. Chat-Clients, die eine angehängte Datei nicht zuverlässig als Base64 übergeben können, rufen zuerst request_upload_link auf.",
"type": "string"
},
"upload_id": {
"description": "Referenz auf eine zuvor über request_upload_link hochgeladene Datei, anstelle von pdf_base64. Genau eines von beiden angeben.",
"type": "string"
}
},
"type": "object"
},
"name": "verify_zugferd",
"outputSchema": {
"properties": {
"attachments": {
"description": "Im CII referenzierte Anhänge (BT-125).",
"items": {
"properties": {
"filename": {
"type": "string"
},
"mimeCode": {
"type": "string"
},
"sizeBytes": {
"type": "integer"
}
},
"type": "object"
},
"type": "array"
},
"authoritative": {
"description": "Autoritative Prüfung: PDF/A-Konformität (ISO 19005-3), XML-Syntax (XSD) und Geschäftsregeln des erkannten Profils. available=false, wenn der Validator-Service nicht erreichbar war; das Ergebnis basiert dann nur auf der Schnellprüfung.",
"properties": {
"available": {
"type": "boolean"
},
"engines": {
"items": {
"type": "string"
},
"type": "array"
},
"errorCount": {
"type": "integer"
},
"findings": {
"items": {
"properties": {
"code": {
"type": "string"
},
"engine": {
"type": "string"
},
"location": {
"type": [
"string",
"null"
]
},
"message": {
"type": "string"
},
"ruleset": {
"type": "string"
},
"severity": {
"enum": [
"error",
"warning",
"info"
],
"type": "string"
},
"source": {
"description": "xsd | schematron | pdfa | structure",
"type": "string"
}
},
"required": [
"code",
"severity",
"message",
"source"
],
"type": "object"
},
"type": "array"
},
"note": {
"type": "string"
},
"profile": {
"type": "string"
},
"verdict": {
"enum": [
"valid",
"valid_with_warnings",
"invalid"
],
"type": "string"
},
"warningCount": {
"type": "integer"
}
},
"required": [
"available"
],
"type": "object"
},
"en16931": {
"description": "EN-16931-Prüfung; null, wenn keine XML eingebettet war.",
"properties": {
"checked": {
"type": "boolean"
},
"errorCount": {
"type": "integer"
},
"findings": {
"items": {
"properties": {
"code": {
"description": "z. B. \"BR-CO-25\".",
"type": "string"
},
"location": {
"type": "string"
},
"message": {
"type": "string"
},
"severity": {
"enum": [
"error",
"warning"
],
"type": "string"
},
"source": {
"enum": [
"schematron",
"supplementary"
],
"type": "string"
}
},
"required": [
"code",
"message",
"severity",
"source"
],
"type": "object"
},
"type": "array"
},
"profile": {
"type": "string"
},
"warningCount": {
"type": "integer"
}
},
"type": [
"object",
"null"
]
},
"pdfa3": {
"description": "PDF/A-3-Anbindung der eingebetteten Dateien (ISO 19005-3 §6.8).",
"properties": {
"allOk": {
"type": "boolean"
},
"files": {
"items": {
"properties": {
"afRelationship": {
"type": [
"string",
"null"
]
},
"associated": {
"type": "boolean"
},
"filename": {
"type": "string"
},
"message": {
"type": "string"
},
"status": {
"enum": [
"ok",
"warning",
"error"
],
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"hasAfArray": {
"type": "boolean"
}
},
"type": [
"object",
"null"
]
},
"structure": {
"description": "Strukturelle Prüfung der PDF (ohne die eingebettete XML).",
"properties": {
"file": {
"properties": {
"bytes": {
"type": "integer"
},
"isPdf": {
"type": "boolean"
},
"pdfVersion": {
"type": [
"string",
"null"
]
},
"present": {
"type": "boolean"
}
},
"type": "object"
},
"zugferd": {
"properties": {
"associatedFile": {
"type": "boolean"
},
"embeddedFiles": {
"type": "boolean"
},
"facturXFilename": {
"type": "boolean"
},
"facturXMetadata": {
"type": "boolean"
},
"pdfAConformance": {
"description": "z. B. \"B\", \"U\".",
"type": [
"string",
"null"
]
},
"pdfAPart": {
"description": "z. B. \"3\" für PDF/A-3.",
"type": [
"string",
"null"
]
},
"xmlEmbedded": {
"type": "boolean"
},
"xmlMatchesGenerated": {
"type": [
"boolean",
"null"
]
}
},
"type": "object"
}
},
"type": "object"
}
},
"required": [
"structure",
"attachments",
"authoritative"
],
"type": "object"
}
}
]
}Verify it yourself
curl -s https://api.teppi.xyz/v1/evidence/sha256:5c078458c8b5c59b50764a52d350d3f55b41264174a7400316903dd6b0037e8a | sha256sum