Skip to main content
Glama

Brief und Vorlage prüfen

letter_preview
Read-only

Rendert einen Brief, Entwurf oder ein Formular als Bild, so wie ein echter Versand ihn komponiert, und liefert Inline-PNGs, PDF-Link, Seitenzahl, Preis und designRender mit dem tatsächlichen documentMode, den gezeichneten Brief-Elementen und bodyStartMm. Die Vorschau ist kostenfrei, und der Brief bleibt liegen. Der Brief kommt über letterId, über eine freigegebene Vorlage (templateId, templateVersionId, templateMergeValues) oder inline mit content ODER blocks; der Empfänger über recipientAddressId oder die recipient-Felder. Bei letterId ist die eingebettete Karte die Vorschau für den Menschen; PDF-Link und Brieftext stehen zusätzlich im Ergebnis, für reine Textansichten. Ein ungespeichertes design gilt nur für diese eine Vorschau. Eigenständige Formulare (Selbstauskunft, Fragebogen, Zertifikat) rendern mit design: { "schemaVersion": 1, "documentMode": "form" } als Formular: dann entfallen Empfängerblock, Datum und Betreff, und der Inhalt beginnt bei 27 mm. 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. Beim Nachbau eines Originals zeigen die PNGs Seite für Seite, ob Seitenzahl und wesentliche Geometrie passen; geänderte blocks oder ein geändertes design rendern im nächsten letter_preview-Aufruf neu. Das passende Layout speichert template_save als Entwurf, template_release gibt es frei. EN: Renders a letter, draft or form as images, composed like a real send, and returns inline PNGs, PDF link, page count, cost and designRender with the actual documentMode, rendered letter chrome and bodyStartMm. The preview is free and the letter stays put. The letter comes via letterId, a released template (templateId, templateVersionId, templateMergeValues) or inline content OR blocks; the recipient via recipientAddressId or the recipient fields. With letterId, the embedded card is the human preview; the PDF link and letter text are also in the result, for text-only views. An unsaved design applies to this one preview only. Standalone forms (self-declaration, questionnaire, certificate) render as a form with design: { "schemaVersion": 1, "documentMode": "form" }: that drops recipient block, date and subject and starts content at 27 mm. Schema reference: frankki://blocks-guide. For a rebuild of an original, the PNGs show page by page whether page count and major geometry match; changed blocks or a changed design render again on the next letter_preview call. template_save stores the matching layout as a draft, template_release releases it.

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": "letter_preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
pagesNoWie viele Seiten als Bild zurückkommen. Standard 3, Maximum 8. Der PDF-Link enthält alle Seiten. EN: How many pages come back as images. Default 3, maximum 8. The PDF link contains every page.
blocksNoStrukturierter 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.
designNoUngespeichertes Briefdesign nur für diese Vorschau. Hat Vorrang vor designId und erzeugt keinen Eintrag im Konto. Eigenständige Formulare rendern mit documentMode: "form". EN: Unsaved letter design for this preview only. Takes precedence over designId and creates no account entry. Standalone forms render with documentMode: "form".
contentNoBrieftext als Fließtext. Genau eines von content und blocks. EN: Letter body as plain text. Exactly one of content and blocks.
subjectNoBetreff. Ohne letterId erforderlich. EN: Subject. Required without a letterId.
designIdNoGespeichertes Briefdesign für diese Vorschau. EN: Saved letter design for this preview.
languageNo
letterIdNoGespeicherter Entwurf für die Vorschau. Alternativ kommt der Brief inline. EN: Stored draft to preview. The letter can come inline instead.
reasoningNo
referenceNoWerte für diesen Brief (Vorgangsnummer, Ihr Zeichen, Kundennummer, QR-Parameter ...). Sie füllen Infoblock und Barcode in der Vorschau. EN: Per-letter values (Vorgangsnummer, Ihr Zeichen, customer number, QR parameters ...). They fill the info block and barcode in the preview.
styleDefsNoBenannte 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.
resolutionNothumb (96 dpi, Standard, schnell und klein) oder full (150 dpi, zum Prüfen von Details). EN: thumb (96 dpi, default, fast and small) or full (150 dpi, for checking details).
templateIdNo
recipientZipNo
recipientCityNo
recipientNameNo
recipientStreetNo
senderProfileIdNo
recipientCompanyNo
recipientCountryNoISO-3166-alpha-2, Standard DE. EN: ISO 3166-1 alpha-2, defaults to DE.
templateVersionIdNoFreigegebene Vorlagenversion, zusammen mit templateId und templateMergeValues: zeigt genau den Brief, den order_send damit verschickt. EN: Released template version, with templateId and templateMergeValues: shows exactly the letter order_send would send with them.
recipientAddressIdNoEmpfänger aus dem Adressbuch. Alternativ die recipient-Felder; fehlt beides, steht ein Musterempfänger im Fenster. EN: Recipient from the address book. Alternatively the recipient fields; if both are missing, a sample recipient fills the window.
templateMergeValuesNo
recipientHouseNumberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / blocks / description
      Previous value: -"Strukturierter Briefinhalt als typisierte Blöcke (Alternative zu content, nie beides). Limits: 200 Blöcke, 100 Zeilen/Tabelle, 20 Spalten, 2000 Zeichen/Zelle, 10 Bilder, 262144 Bytes. EN: structured letter content as typed blocks (alternative to content, never both). Jeder Block braucht type; erlaubte Typen: paragraph, heading, keyValue, checkboxRow, fillLine, table, totals, columns, box, image, spacer, pageBreak. Die vollstaendige Feldreferenz liegt in der MCP-Ressource frankki://blocks-guide. EN: every block needs type; read frankki://blocks-guide for the complete field reference."New value: +"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."
    • changedInput schema / properties / content / description
      Previous value: -"Brieftext als Fließtext. Entweder content ODER blocks, nie beides. EN: letter body as plain text. Either content OR blocks, never both."New value: +"Brieftext als Fließtext. Genau eines von content und blocks. EN: Letter body as plain text. Exactly one of content and blocks."
    • changedInput schema / properties / design / description
      Previous value: -"Ungespeichertes Briefdesign nur für diese Vorschau. Hat Vorrang vor designId und erzeugt keinen Eintrag im Konto. Für eigenständige Formulare documentMode: \"form\" setzen. EN: Unsaved letter design for this preview only. Takes precedence over designId and creates no account entry. Set documentMode: \"form\" for standalone forms."New value: +"Ungespeichertes Briefdesign nur für diese Vorschau. Hat Vorrang vor designId und erzeugt keinen Eintrag im Konto. Eigenständige Formulare rendern mit documentMode: \"form\". EN: Unsaved letter design for this preview only. Takes precedence over designId and creates no account entry. Standalone forms render with documentMode: \"form\"."
    • changedInput schema / properties / designId / description
      Previous value: -"Ein gespeichertes Briefdesign für diese Vorschau verwenden. EN: Use a saved letter design for this preview."New value: +"Gespeichertes Briefdesign für diese Vorschau. EN: Saved letter design for this preview."
    • changedInput schema / properties / letterId / description
      Previous value: -"Einen gespeicherten Entwurf in der Vorschau anzeigen. Alternativ den Brief inline angeben. EN: Preview a stored draft. Alternatively provide the letter inline."New value: +"Gespeicherter Entwurf für die Vorschau. Alternativ kommt der Brief inline. EN: Stored draft to preview. The letter can come inline instead."
    • changedInput schema / properties / pages / description
      Previous value: -"Wie viele Seiten als Bild zurückkommen. Standard 3, Maximum 8. Der PDF-Link enthält immer alle Seiten. EN: How many pages come back as images. Default 3, maximum 8. The PDF link always contains every page."New value: +"Wie viele Seiten als Bild zurückkommen. Standard 3, Maximum 8. Der PDF-Link enthält alle Seiten. EN: How many pages come back as images. Default 3, maximum 8. The PDF link contains every page."
    • changedInput schema / properties / reference / description
      Previous value: -"Werte für diesen Brief (Vorgangsnummer, Ihr Zeichen, Kundennummer, QR-Parameter ...). Sie füllen Infoblock und Barcode in der Vorschau. EN: Per-letter values (Vorgangsnummer, your reference, customer number, QR parameters ...). They fill the info block and barcode in the preview."New value: +"Werte für diesen Brief (Vorgangsnummer, Ihr Zeichen, Kundennummer, QR-Parameter ...). Sie füllen Infoblock und Barcode in der Vorschau. EN: Per-letter values (Vorgangsnummer, Ihr Zeichen, customer number, QR parameters ...). They fill the info block and barcode in the preview."
    • changedInput schema / properties / styleDefs / description
      Previous value: -"Benannte Stile für das ganze Dokument (max. 24). Blöcke referenzieren sie über style. EN: named document styles (max 24); blocks reference them via style. Vollstaendige Stilfelder: frankki://blocks-guide. EN: complete style fields: frankki://blocks-guide."New value: +"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."
  2. Changed11 schema fields changed
    • addedInput schema / properties / recipientAddressId
      Added value: +{
      +  "description": "Empfänger aus dem Adressbuch. Alternativ die recipient-Felder; fehlt beides, steht ein Musterempfänger im Fenster. EN: Recipient from the address book. Alternatively the recipient fields; if both are missing, a sample recipient fills the window.",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedInput schema / properties / recipientCity
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / recipientCompany
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / recipientCountry
      Added value: +{
      +  "description": "ISO-3166-alpha-2, Standard DE. EN: ISO 3166-1 alpha-2, defaults to DE.",
      +  "type": "string"
      +}
    • addedInput schema / properties / recipientHouseNumber
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / recipientName
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / recipientStreet
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / recipientZip
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / templateId
      Added value: +{
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedInput schema / properties / templateMergeValues
      Added value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
    • addedInput schema / properties / templateVersionId
      Added value: +{
      +  "description": "Freigegebene Vorlagenversion, zusammen mit templateId und templateMergeValues: zeigt genau den Brief, den order_send damit verschickt. EN: Released template version, with templateId and templateMergeValues: shows exactly the letter order_send would send with them.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  3. Changed8 schema fields changed
    • changedInput schema / properties / blocks / description
      Previous value: -"Strukturierter Briefinhalt als typisierte Bloecke (Alternative zu content, nie beides). Limits: 200 Bloecke, 100 Zeilen/Tabelle, 20 Spalten, 2000 Zeichen/Zelle, 10 Bilder, 262144 Bytes. EN: structured letter content as typed blocks (alternative to content, never both). Jeder Block braucht type; erlaubte Typen: paragraph, heading, keyValue, checkboxRow, fillLine, table, totals, columns, box, image, spacer, pageBreak. Die vollstaendige Feldreferenz liegt in der MCP-Ressource frankki://blocks-guide. EN: every block needs type; read frankki://blocks-guide for the complete field reference."New value: +"Strukturierter Briefinhalt als typisierte Blöcke (Alternative zu content, nie beides). Limits: 200 Blöcke, 100 Zeilen/Tabelle, 20 Spalten, 2000 Zeichen/Zelle, 10 Bilder, 262144 Bytes. EN: structured letter content as typed blocks (alternative to content, never both). Jeder Block braucht type; erlaubte Typen: paragraph, heading, keyValue, checkboxRow, fillLine, table, totals, columns, box, image, spacer, pageBreak. Die vollstaendige Feldreferenz liegt in der MCP-Ressource frankki://blocks-guide. EN: every block needs type; read frankki://blocks-guide for the complete field reference."
    • changedInput schema / properties / content / description
      Previous value: -"Brieftext als Fliesstext. Entweder content ODER blocks, nie beides. EN: letter body as plain text. Either content OR blocks, never both."New value: +"Brieftext als Fließtext. Entweder content ODER blocks, nie beides. EN: letter body as plain text. Either content OR blocks, never both."
    • changedInput schema / properties / design / description
      Previous value: -"Ungespeichertes Briefdesign nur fuer diese Vorschau. Hat Vorrang vor designId und erzeugt keinen Eintrag im Konto. Fuer eigenstaendige Formulare documentMode: \"form\" setzen. EN: Unsaved letter design for this preview only. Takes precedence over designId and creates no account entry. Set documentMode: \"form\" for standalone forms."New value: +"Ungespeichertes Briefdesign nur für diese Vorschau. Hat Vorrang vor designId und erzeugt keinen Eintrag im Konto. Für eigenständige Formulare documentMode: \"form\" setzen. EN: Unsaved letter design for this preview only. Takes precedence over designId and creates no account entry. Set documentMode: \"form\" for standalone forms."
    • changedInput schema / properties / designId / description
      Previous value: -"Ein gespeichertes Briefdesign fuer diese Vorschau verwenden. EN: Use a saved letter design for this preview."New value: +"Ein gespeichertes Briefdesign für diese Vorschau verwenden. EN: Use a saved letter design for this preview."
    • changedInput schema / properties / pages / description
      Previous value: -"Wie viele Seiten als Bild zurueckkommen. Standard 3, Maximum 8. Der PDF-Link enthaelt immer alle Seiten. EN: How many pages come back as images. Default 3, maximum 8. The PDF link always contains every page."New value: +"Wie viele Seiten als Bild zurückkommen. Standard 3, Maximum 8. Der PDF-Link enthält immer alle Seiten. EN: How many pages come back as images. Default 3, maximum 8. The PDF link always contains every page."
    • changedInput schema / properties / reference / description
      Previous value: -"Werte fuer diesen Brief (Vorgangsnummer, Ihr Zeichen, Kundennummer, QR-Parameter ...). Sie fuellen Infoblock und Barcode in der Vorschau. EN: Per-letter values (Vorgangsnummer, your reference, customer number, QR parameters ...). They fill the info block and barcode in the preview."New value: +"Werte für diesen Brief (Vorgangsnummer, Ihr Zeichen, Kundennummer, QR-Parameter ...). Sie füllen Infoblock und Barcode in der Vorschau. EN: Per-letter values (Vorgangsnummer, your reference, customer number, QR parameters ...). They fill the info block and barcode in the preview."
    • changedInput schema / properties / resolution / description
      Previous value: -"thumb (96 dpi, Standard, schnell und klein) oder full (150 dpi, zum Pruefen von Details). EN: thumb (96 dpi, default, fast and small) or full (150 dpi, for checking details)."New value: +"thumb (96 dpi, Standard, schnell und klein) oder full (150 dpi, zum Prüfen von Details). EN: thumb (96 dpi, default, fast and small) or full (150 dpi, for checking details)."
    • changedInput schema / properties / styleDefs / description
      Previous value: -"Benannte Stile fuer das ganze Dokument (max. 24). Bloecke referenzieren sie ueber style. EN: named document styles (max 24); blocks reference them via style. Vollstaendige Stilfelder: frankki://blocks-guide. EN: complete style fields: frankki://blocks-guide."New value: +"Benannte Stile für das ganze Dokument (max. 24). Blöcke referenzieren sie über style. EN: named document styles (max 24); blocks reference them via style. Vollstaendige Stilfelder: frankki://blocks-guide. EN: complete style fields: frankki://blocks-guide."
  4. First observed

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description reinforces the safety profile with concrete detail: the preview is free, the letter 'stays put', and an unsaved design 'creates no account entry' and takes precedence over designId. It does not mention limits on cost/quota per preview or failure behavior for over-limit blocks, so not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Structure is good — purpose first, then input routes, form mode, a compact blocks example, then sibling pointers — but the entire text is duplicated verbatim in German and English, roughly doubling token cost for an agent that only needs one language. Several sentences (the geometry/rebuild paragraph, the blocks example) are close to restating what the schema and the blocks-guide resource already contain.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description does the work of enumerating return values (PNGs per page, PDF link covering all pages, page count, cost, designRender with documentMode/chrome/bodyStartMm) so an agent knows what comes back. For a 24-parameter tool with a deeply nested design object, however, the design sub-schema is left to inference, and the form-mode behavior is described while other modes' layout effects are not.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 54% across 24 parameters, and the description does compensate for the most consequential ones: the mutually exclusive letter sources, 'exactly one of content and blocks', recipient via recipientAddressId or recipient fields (with sample-recipient fallback), and design precedence over designId. But the large nested design object (chrome, header, footer, barcode, infoblock, marginText, falzmarken, continuation) is explained nowhere beyond documentMode, leaving a major documented gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource — rendering a letter, draft or form as an image 'composed like a real send' — and enumerates the return payload (inline PNGs, PDF link, page count, cost, designRender). It also states the three input routes (letterId, released template, inline content/blocks), so an agent can tell what this does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clear context is given: the preview is free, the letter is not persisted, an unsaved design applies to this one call only, and template_save/template_release are named as the follow-up for layout work. It never explicitly contrasts itself with the sibling preview tools (letter_design_preview, template_preview), which with templateId in the schema would be genuinely ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.