Skip to main content
Glama

Beleg erstellen

document_create
Destructive

Erzeugt aus strukturierten Belegdaten ein fertiges Dokument und legt es als Briefentwurf an: FrankKi rechnet Positionen, Netto, USt-Sätze und Brutto nach, prüft die Pflichtangaben nach § 14 UStG, vergibt auf Wunsch die Belegnummer aus dem Nummernkreis des Kontos und setzt alles im DIN-5008-Layout mit dem Briefdesign des Absenders. Der Entwurf bleibt kostenfrei liegen, bis er versendet wird. Alle Beträge in ganzen Cent. Kompaktes Beispiel: {"document":{"documentType":"rechnung","documentNumber":"RE-2026-014","documentDate":"2026-07-30","leistungszeitraum":{"von":"2026-06-01","bis":"2026-06-30"},"zahlungszielTage":14,"lineItems":[{"description":"Beratung Juni","quantity":4,"unit":"Std","unitPriceCents":12000,"ustRate":19,"lineNetCents":48000}],"totals":{"nettoCents":48000,"ustLines":[{"rate":19,"netCents":48000,"ustCents":9120}],"bruttoCents":57120}},"recipientAddressId":"…"} Nächster Schritt mit der zurückgegebenen letterId: order_send versendet den Brief, approval_submit legt ihn stattdessen einem Menschen zur Freigabe vor, letter_schedule versendet ihn später. EN: Turns a structured billing payload into a finished document and stores it as a letter draft: FrankKi re-computes line items, net, VAT rates and gross, checks the mandatory details under § 14 UStG, optionally draws the document number from the account's sequence, and typesets everything in the DIN 5008 layout with the sender's letter design. The draft stays free of charge until it is sent. All amounts in integer cents. Compact example: {"document":{"documentType":"rechnung","documentNumber":"RE-2026-014","documentDate":"2026-07-30","leistungszeitraum":{"von":"2026-06-01","bis":"2026-06-30"},"zahlungszielTage":14,"lineItems":[{"description":"Beratung Juni","quantity":4,"unit":"Std","unitPriceCents":12000,"ustRate":19,"lineNetCents":48000}],"totals":{"nettoCents":48000,"ustLines":[{"rate":19,"netCents":48000,"ustCents":9120}],"bruttoCents":57120}},"recipientAddressId":"…"} Next step with the returned letterId: order_send sends the letter, approval_submit puts it in front of a human for approval instead, letter_schedule sends it later.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document": "<document>"
    },
    "name": "document_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
subjectNoBetreff des Briefs. Ohne Angabe setzt FrankKi ihn aus Dokumentart und Belegnummer, z. B. 'Rechnung RE-2026-014'. EN: letter subject. If omitted FrankKi builds it from the document type and number.
designIdNo
documentYesDie Belegdaten. Alle Beträge in ganzen Cent. Der Aufruf liefert die Summen mit, FrankKi rechnet sie nach und lehnt Abweichungen ab. EN: The document payload. All amounts in integer cents. The call supplies the sums, FrankKi re-computes them and rejects mismatches.
languageNoStandard de. EN: Defaults to de.
reasoningNo
referenceNo
signatureIdNo
sequenceScopeNo
clientLetterIdNoIdempotenzschlüssel für den Briefentwurf. EN: idempotency key for the letter draft.
mandantennummerNoMandant, dem das Dokument zugeordnet wird. Nur Zuordnung für Liste und Auswertung. EN: client this document is filed under. Filing only.
senderAddressIdNo
senderProfileIdNoAbsenderprofil, aus dem die Pflichtangaben (USt-IdNr oder Steuernummer) gelesen werden. Ohne Angabe gilt das Standardprofil. EN: Sender profile the mandatory tax details are read from. Defaults to the default profile.
includeSignatureNo
recipientAddressIdNoEmpfänger aus dem Adressbuch (address_list / mandant_search liefern die id). Entweder das oder recipientAddressInline. EN: Recipient from the address book (address_list / mandant_search return the id). Either this or recipientAddressInline.
recipientAddressInlineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / document / description
      Previous value: -"Die Belegdaten. Alle Beträge in ganzen Cent. Du lieferst die Summen, FrankKi rechnet sie nach und lehnt Abweichungen ab. EN: the document payload. All amounts in integer cents. You supply the sums, FrankKi re-computes them and rejects mismatches."New value: +"Die Belegdaten. Alle Beträge in ganzen Cent. Der Aufruf liefert die Summen mit, FrankKi rechnet sie nach und lehnt Abweichungen ab. EN: The document payload. All amounts in integer cents. The call supplies the sums, FrankKi re-computes them and rejects mismatches."
    • changedInput schema / properties / document / properties / documentNumber / description
      Previous value: -"Deine Belegnummer, eindeutig je Nummernkreis. EN: your document number, unique per number circle."New value: +"Eigene Belegnummer, eindeutig je Nummernkreis. EN: Own document number, unique per number circle."
    • changedInput schema / properties / document / properties / lineItems / items / properties / lineNetCents / description
      Previous value: -"Zeilensumme netto in Cent, die du behauptest. FrankKi rechnet quantity * unitPriceCents nach. EN: the net line sum in cents you claim. FrankKi re-computes quantity * unitPriceCents."New value: +"Behauptete Zeilensumme netto in Cent. FrankKi rechnet quantity * unitPriceCents nach. EN: The claimed net line sum in cents. FrankKi re-computes quantity * unitPriceCents."
    • changedInput schema / properties / document / properties / mahnstufe / description
      Previous value: -"Nur bei documentType 'mahnung', dort Pflicht. EN: only for documentType 'mahnung', required there."New value: +"Gilt für documentType 'mahnung' und ist dort erforderlich. EN: Applies to documentType 'mahnung' and is required there."
    • changedInput schema / properties / document / properties / numberFromSequence / description
      Previous value: -"true = FrankKi zieht die nächste Nummer aus deinem Nummernkreis. Dann documentNumber weglassen. EN: true = FrankKi draws the next number from your sequence; omit documentNumber then."New value: +"true = FrankKi zieht die nächste Nummer aus dem Nummernkreis des Kontos; documentNumber entfällt dann. EN: true = FrankKi draws the next number from the account's sequence; documentNumber is then left out."
    • changedInput schema / properties / language / description
      Previous value: -"Standard de. EN: defaults to de."New value: +"Standard de. EN: Defaults to de."
    • changedInput schema / properties / recipientAddressId / description
      Previous value: -"Empfänger aus deinem Adressbuch (address_list / mandant_search liefern die id). Entweder das oder recipientAddressInline. EN: recipient from your address book. Either this or recipientAddressInline."New value: +"Empfänger aus dem Adressbuch (address_list / mandant_search liefern die id). Entweder das oder recipientAddressInline. EN: Recipient from the address book (address_list / mandant_search return the id). Either this or recipientAddressInline."
    • changedInput schema / properties / senderProfileId / description
      Previous value: -"Absenderprofil, aus dem die Pflichtangaben (USt-IdNr oder Steuernummer) gelesen werden. Ohne Angabe gilt dein Standardprofil. EN: sender profile the mandatory tax details are read from. Defaults to your default profile."New value: +"Absenderprofil, aus dem die Pflichtangaben (USt-IdNr oder Steuernummer) gelesen werden. Ohne Angabe gilt das Standardprofil. EN: Sender profile the mandatory tax details are read from. Defaults to the default profile."
  2. Changed10 schema fields changed
    • changedInput schema / properties / clientLetterId / description
      Previous value: -"Idempotenzschluessel fuer den Briefentwurf. EN: idempotency key for the letter draft."New value: +"Idempotenzschlüssel für den Briefentwurf. EN: idempotency key for the letter draft."
    • changedInput schema / properties / document / description
      Previous value: -"Die Belegdaten. Alle Betraege in ganzen Cent. Du lieferst die Summen, FrankKi rechnet sie nach und lehnt Abweichungen ab. EN: the document payload. All amounts in integer cents. You supply the sums, FrankKi re-computes them and rejects mismatches."New value: +"Die Belegdaten. Alle Beträge in ganzen Cent. Du lieferst die Summen, FrankKi rechnet sie nach und lehnt Abweichungen ab. EN: the document payload. All amounts in integer cents. You supply the sums, FrankKi re-computes them and rejects mismatches."
    • changedInput schema / properties / document / properties / kleinunternehmerParagraph19 / description
      Previous value: -"§19 UStG Kleinunternehmer: keine USt-Zeile, Brutto gleich Netto, Pflichthinweis wird ergaenzt. EN: German small-business rule: no VAT line, gross equals net, the mandatory note is added."New value: +"§19 UStG Kleinunternehmer: keine USt-Zeile, Brutto gleich Netto, Pflichthinweis wird ergänzt. EN: German small-business rule: no VAT line, gross equals net, the mandatory note is added."
    • changedInput schema / properties / document / properties / lineItems / items / properties / quantity / description
      Previous value: -"Menge, hoechstens 3 Nachkommastellen. EN: quantity, at most 3 decimals."New value: +"Menge, höchstens 3 Nachkommastellen. EN: quantity, at most 3 decimals."
    • changedInput schema / properties / document / properties / numberFromSequence / description
      Previous value: -"true = FrankKi zieht die naechste Nummer aus deinem Nummernkreis. Dann documentNumber weglassen. EN: true = FrankKi draws the next number from your sequence; omit documentNumber then."New value: +"true = FrankKi zieht die nächste Nummer aus deinem Nummernkreis. Dann documentNumber weglassen. EN: true = FrankKi draws the next number from your sequence; omit documentNumber then."
    • changedInput schema / properties / document / properties / references / description
      Previous value: -"Bezug auf ein frueheres Dokument. documentId fuer ein Dokument aus FrankKi, documentNumber fuer einen Fremdbeleg. EN: reference to a prior document."New value: +"Bezug auf ein früheres Dokument. documentId für ein Dokument aus FrankKi, documentNumber für einen Fremdbeleg. EN: reference to a prior document."
    • changedInput schema / properties / document / properties / references / properties / zahlungszielDatum / description
      Previous value: -"Zahlungsziel des Bezugsbelegs, also seit wann die Forderung offen ist. Wird auf Mahnung und Zahlungserinnerung als \"Zahlungsziel ueberschritten seit\" gedruckt. EN: due date of the referenced document, printed on a dunning letter or reminder as the date since when the claim is overdue."New value: +"Zahlungsziel des Bezugsbelegs, also seit wann die Forderung offen ist. Wird auf Mahnung und Zahlungserinnerung als \"Zahlungsziel überschritten seit\" gedruckt. EN: due date of the referenced document, printed on a dunning letter or reminder as the date since when the claim is overdue."
    • changedInput schema / properties / document / properties / totals / properties / extraLines / description
      Previous value: -"Freie Zeilen unter dem Bruttobetrag. Geprueft wird nur die Rechnung, die die Zeile selbst behauptet. EN: free-form lines below the gross total, checked only for the arithmetic the line itself claims."New value: +"Freie Zeilen unter dem Bruttobetrag. Geprüft wird nur die Rechnung, die die Zeile selbst behauptet. EN: free-form lines below the gross total, checked only for the arithmetic the line itself claims."
    • changedInput schema / properties / mandantennummer / description
      Previous value: -"Mandant, dem das Dokument zugeordnet wird. Nur Zuordnung fuer Liste und Auswertung. EN: client this document is filed under. Filing only."New value: +"Mandant, dem das Dokument zugeordnet wird. Nur Zuordnung für Liste und Auswertung. EN: client this document is filed under. Filing only."
    • changedInput schema / properties / recipientAddressId / description
      Previous value: -"Empfaenger aus deinem Adressbuch (address_list / mandant_search liefern die id). Entweder das oder recipientAddressInline. EN: recipient from your address book. Either this or recipientAddressInline."New value: +"Empfänger aus deinem Adressbuch (address_list / mandant_search liefern die id). Entweder das oder recipientAddressInline. EN: recipient from your address book. Either this or recipientAddressInline."
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations, it discloses that FrankKi recomputes the caller's sums and rejects mismatches, that the number can be drawn from the account's sequence, that the draft incurs no cost until sent, and that amounts are in integer cents. With destructiveHint=true declared but not explained anywhere, one behavioral gap remains: nothing says what is destructive about creating a draft or how a draft can be discarded.

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?

The German core paragraph is front-loaded and does the real work of explaining the computation and layout. However, the entire text and the full JSON example are repeated verbatim in English, which roughly doubles length without adding information, and the example is large for a description field.

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?

For a 15-parameter nested mutation with no output schema, the description supplies the return handle (letterId), the recomputation rule, the cents convention and a concrete example, so the agent can call it correctly. Recipient resolution (recipientAddressId vs recipientAddressInline) and the optional styling/signature parameters are left to the schema.

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 47%, so the description has to compensate for the 15 parameters, and it does so in part: it introduces cents semantics and a full worked payload that shows the shape of document, lineItems, totals and recipient. It does not explain the optional top-level parameters such as designId, signatureId, mandantennummer, sequenceScope or clientLetterId, which remain undocumented in both places.

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

Purpose4/5

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

The description states a precise verb and resource: it turns a structured billing payload into a document and stores it as a letter draft, computing line items, net, VAT and gross and validating § 14 UStG details. The scope (rechnung/mahnung/zahlungserinnerung/gutschrift, DIN 5008 typesetting) makes it clearly a billing-document tool. It never explicitly names the closest sibling letter_create_draft, so the agent must infer why one is chosen over the other.

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?

It clearly routes the next step: order_send sends the letter, approval_submit sends it for human approval, letter_schedule schedules it, all keyed on the returned letterId. It also says the draft is free of charge until sent, which frames the cost consequences of using it. What is missing is an explicit statement of when to prefer this tool over letter_create_draft or template_apply_with_merge_fields.

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.