Brief versenden
order_sendVersendet einen Brief per Post: prüft die Pflichtangaben des Absenders, die Empfängeradresse, den AVV und die Limits, erstellt die PDF und berechnet den Preis. Der Brief kommt über letterId (ein Entwurf) oder inline: dann ist der Text content (Fließtext) oder blocks (strukturiert: Tabellen, Überschriften, Summenzeilen), genau eines von beiden. Kompaktes blocks-Beispiel: {"blocks":[{"type":"heading","text":"Rechnung"},{"type":"table","columns":[{"key":"text","label":"Artikel","width":"grow"},{"key":"sum","label":"Summe","align":"right","format":"eur"}],"rows":[{"text":"Beratung","sum":32000}]},{"type":"totals","lines":[{"label":"Gesamt","amountCents":32000,"emphasis":true}]}]} Schema-Referenz: frankki://blocks-guide. dryRun: true ist eine kostenfreie Probe: sie liefert Preis, Seite 1 als Bild und die Liste checks (jede Prüfung mit passed, failed oder skipped), und der Brief bleibt unversandt; ein zweiter Aufruf mit denselben Werten und dryRun: false versendet genau diesen Brief. Ein echter Versand wartet auf Freigabe. Autopilot ist eine Dashboard-Einstellung, die die Person selbst steuert: mit ihm geht ein Standardbrief aus eigener freigegebener Vorlage (templateId plus templateVersionId) an einen Empfänger aus dem Adressbuch nach 10 Minuten raus. saveRecipient: true trägt den Empfänger dabei ein, humanSummary nennt die Uhrzeit, order_status und order_cancel nehmen die approvalId. mcp_health meldet unter setup, welcher Freigabeweg gilt. Für eine Mahnung, Kündigung, Mieterhöhung oder einen anderen Brief mit Frist gibt es das Einschreiben mit Nachweis; seinen Preis liefert shipping_quote. Eine fertige eigene PDF geht unverändert raus: letter_upload_pdf prüft und speichert sie, order_send versendet sie dann mit pdfStorageKey und Empfänger. EN: Sends a letter by post: checks the sender's mandatory details, the recipient address, the AVV and the limits, creates the PDF and calculates the price. The letter arrives via letterId (a draft) or inline: then the body is content (plain text) or blocks (structured: tables, headings, totals lines), exactly one of the two. Compact blocks example: {"blocks":[{"type":"heading","text":"Rechnung"},{"type":"table","columns":[{"key":"text","label":"Artikel","width":"grow"},{"key":"sum","label":"Summe","align":"right","format":"eur"}],"rows":[{"text":"Beratung","sum":32000}]},{"type":"totals","lines":[{"label":"Gesamt","amountCents":32000,"emphasis":true}]}]} Schema reference: frankki://blocks-guide. dryRun: true is a free rehearsal: it returns the price, page 1 as an image and the checks list (each gate with passed, failed or skipped), and the letter stays unsent; a second call with the same values and dryRun: false sends exactly that letter. A real send waits for approval. Autopilot is a dashboard setting the person controls: with it, a standard letter from an own released template (templateId plus templateVersionId) to an address-book recipient leaves after 10 minutes. saveRecipient: true adds the recipient on the way, humanSummary names the time, order_status and order_cancel take the approvalId. mcp_health reports under setup which approval path applies. For a Mahnung, Kündigung, Mieterhöhung or other deadline letter, Einschreiben adds a proof of posting; shipping_quote returns its price. A finished own PDF goes out unchanged: letter_upload_pdf checks and stores it, then order_send sends it with pdfStorageKey and the recipient.
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": "order_send"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | Ohne Angabe wird die Farbe automatisch erkannt. EN: If omitted, colour is detected automatically. | |
| blocks | No | Strukturierter Briefinhalt als typisierte Blöcke, an Stelle von content. Limits: 200 Blöcke, 100 Zeilen/Tabelle, 20 Spalten, 2000 Zeichen/Zelle, 10 Bilder, 262144 Bytes. Jeder Block braucht type; erlaubte Typen: paragraph, heading, keyValue, checkboxRow, fillLine, table, totals, columns, box, image, spacer, pageBreak. Feldreferenz: MCP-Ressource frankki://blocks-guide. EN: Structured letter content as typed blocks, in place of content. Limits: 200 blocks, 100 rows per table, 20 columns, 2000 characters per cell, 10 images, 262144 bytes. Every block needs type; allowed types: paragraph, heading, keyValue, checkboxRow, fillLine, table, totals, columns, box, image, spacer, pageBreak. Field reference: MCP resource frankki://blocks-guide. | |
| design | No | Exakter Briefdesign-Snapshot aus template_apply_with_merge_fields.composition.design. Hat Vorrang vor designId und verhindert, dass eine spätere Designänderung die freigegebene Vorlagenkomposition verändert. EN: Exact letter-design snapshot from template_apply_with_merge_fields.composition.design. Takes precedence over designId and prevents later design edits from changing the released template composition. | |
| dryRun | No | Probe ohne Kosten; liefert Seite 1 als Bild und die Liste checks (jede Prüfung mit passed, failed oder skipped). EN: Free rehearsal; returns page 1 as an image and the checks list (each gate with passed, failed or skipped). | |
| content | No | Brieftext als Fließtext. Genau eines von content und blocks. EN: Letter body as plain text. Exactly one of content and blocks. | |
| express | No | ||
| subject | No | ||
| auditTag | No | ||
| designId | No | Gespeichertes Briefdesign für diesen Versand. Ohne Angabe gilt in dieser Reihenfolge: das am Entwurf gespeicherte Design (beim Versand über letterId), sonst das Standard-Design des Absenderprofils, sonst keins. EN: Saved letter design for this send. If omitted, in order: the design stored on the draft (when sending by letterId), else the sender profile default design, else none. | |
| letterId | No | Bestehender Entwurf. Alternativ kommt der Brief inline. EN: Existing draft. The letter can come inline instead. | |
| reasoning | No | ||
| reference | No | Werte für diesen Brief (Vorgangsnummer, Ihr Zeichen, Kundennummer, QR-Parameter ...). Sie füllen den Infoblock und den Barcode. EN: Per-letter values (Vorgangsnummer, Ihr Zeichen, customer number, QR parameters ...). They fill the info block and the barcode. | |
| styleDefs | No | Benannte Stile für das ganze Dokument (max. 24). Blöcke referenzieren sie über style. Stilfelder: frankki://blocks-guide. EN: Named document styles (max 24); blocks reference them via style. Style fields: frankki://blocks-guide. | |
| presetName | No | ||
| templateId | No | ||
| scheduledAt | No | ||
| signatureId | No | ||
| approvalMode | No | Wie der Versand freigegeben wird. 'draft' und 'review' stellen ihn in die Freigabe-Warteschlange, statt sofort zu versenden. 'auto' wird derzeit genauso behandelt wie 'review': der Brief wartet auf die Freigabe durch einen Menschen. Mit einem Test-Token läuft jeder Modus als Probe. Auch diese beiden reservieren den Betrag beim Einreichen im Wallet, damit ein freigegebener Brief später nicht am Guthaben scheitert. Ohne Deckung kommt INSUFFICIENT_FUNDS zurück und es wird nichts angelegt. Einen Entwurf ohne Wallet-Deckung legt letter_create_draft an. EN: How the send is approved. 'draft' and 'review' put it into the approval queue instead of sending immediately. 'auto' is currently treated exactly like 'review': the letter waits for a person to approve it. With a test token every mode runs as a rehearsal. Both still reserve the amount in the wallet at submit time, so an approved letter cannot fail on funds later. Without cover the call returns INSUFFICIENT_FUNDS and nothing is created. letter_create_draft creates a draft with no wallet cover. | |
| deliveryType | No | Standard standard. EN: Defaults to standard. | |
| letterheadId | No | Bestimmter Briefkopf für diesen Versand. Ohne Angabe wird der Standard-Briefkopf verwendet. EN: A specific letterhead for this send. If omitted, the default letterhead is used. | |
| maxCostEuros | No | Maximalbetrag in Euro. Liegt der Preis darüber, wird abgebrochen. EN: Maximum amount in euros. If the price is above it, the call is aborted. | |
| priceVersion | No | Optional: die priceVersion aus einem vorherigen shipping_quote. Weicht der Preis beim Versand davon ab, wird mit PRICE_CHANGED abgebrochen, bevor etwas berechnet wird. EN: Optional: the priceVersion from an earlier shipping_quote. If the price at send time differs, the call is aborted with PRICE_CHANGED before anything is charged. | |
| recipientZip | No | ||
| clientOrderId | No | Idempotenzschlüssel: eine beliebige Zeichenkette (1-200 Zeichen, z. B. 'mahnung-kunde42-2026-07-20'; kein UUID-Format nötig). Ein erneuter Aufruf mit demselben Wert liefert dieselbe Bestellung, statt ein zweites Mal zu versenden. Der Namensraum 'approval:' ist reserviert. EN: Idempotency key: any string (1-200 characters, e.g. 'mahnung-kunde42-2026-07-20'; no UUID format required). A repeat call with the same value returns the same order instead of sending a second time. The 'approval:' namespace is reserved. | |
| pdfStorageKey | No | Der Schlüssel aus letter_upload_pdf, wenn eine eigene fertige PDF der Brief ist, an Stelle von Betreff und Text. Dazu gehören die Empfängerfelder, so wie sie auf der PDF stehen, und die deliveryType. Der Versand prüft, ob die Adresse im Adressfeld der Versandart steht, beim Standardbrief 60 bis 85,5 mm von oben, beim Einschreiben 68 bis 85,5 mm. Steht sie woanders, nennt PDF_LAYOUT_INVALID die Millimeter zum Verschieben. EN: The key from letter_upload_pdf, when an own finished PDF is the letter, in place of subject and body. It goes with the recipient fields exactly as printed on the PDF, and the deliveryType. The send checks that the address sits in the address zone of the delivery method, 60 to 85.5 mm from the top for a standard letter and 68 to 85.5 mm for Einschreiben. If it sits elsewhere, PDF_LAYOUT_INVALID gives the millimetres to move. | |
| recipientCity | No | ||
| recipientName | No | ||
| saveRecipient | No | true übernimmt den Empfänger mit diesem Versand ins Adressbuch (für Autopilot). EN: true saves the recipient to the address book with this send (for autopilot). | |
| coverTemplateId | No | Anschreiben für eine eigenständige Formularvorlage. EN: Cover letter for a standalone form template. | |
| includeGeometry | No | Liefert zusätzlich die Layoutdaten der Seiten. EN: Also returns the page layout data. | |
| mandantennummer | No | ||
| recipientStreet | No | ||
| senderAddressId | No | ||
| senderProfileId | No | ||
| includeSignature | No | ||
| recipientCompany | No | ||
| recipientCountry | No | ISO-3166-alpha-2, Standard DE. EN: ISO 3166-1 alpha-2, defaults to DE. | |
| letterheadEnabled | No | false lässt den Briefkopf für diesen einen Versand weg. EN: false leaves the letterhead off for this one send. | |
| templateVersionId | No | Exakte freigegebene Vorlagenversion. Nur gemeinsam mit templateId; der Server rendert sie mit templateMergeValues neu und ignoriert mitgesendeten Betreff/Inhalt. EN: Exact released template version. Only with templateId; the server rerenders it with templateMergeValues and ignores caller-supplied subject/content. | |
| recipientAddressId | No | Eine gespeicherte Adresse aus dem Adressbuch (address_list) als Empfänger, an Stelle der Felder recipientName bis recipientCountry. EN: A saved address from the address book (address_list) as the recipient, in place of the fields recipientName to recipientCountry. | |
| templateMergeValues | No | Merge-Werte für die exakte Vorlagenversion. EN: Merge values for the exact template version. | |
| quotedUnitPriceCents | No | Optional: der Stückpreis in Cent aus einem vorherigen shipping_quote (unitPriceCents). Ist er gesetzt, entscheidet er den PRICE_CHANGED-Abgleich und liefert den alten Preis im Fehler mit. EN: Optional: the unit price in cents from an earlier shipping_quote (unitPriceCents). If set, it decides the PRICE_CHANGED comparison and returns the old price in the error. | |
| recipientHouseNumber | No | ||
| coverTemplateVersionId | No | Exakte freigegebene Version des Anschreibens. EN: Exact released version of the cover letter. |