Compose a letter
compose_letterUse this when the user wants to write a new paper letter from text and post it, for example to cancel a contract, subscription or membership by letter, file a complaint or objection, or send a formal notice, by ordinary or registered mail. Renders an A4 letter (DIN 5008 layout: sender block with the user's own name and address, recipient, place and date, subject, body, closing, signature) that passes the print check, and creates a draft with the exact price. Nothing is sent or charged: show the user the draft and the total, ask for confirmation, then call send_letter. The sender can live in any country. For the account's first letter the sender block must carry the user's REAL full name (first and last name, no alias, nickname or pseudonym) and postal address: it is then saved as the account's sender details; without valid ones the call fails with SENDER_DETAILS_REQUIRED. Once the account has sender details, the sender block is printed as given and the saved details stay as they are (sender_details: on_file when the block matches them, kept when it differs): the user changes them in Settings → Your details. Body supports paragraphs (blank line), '- ' bullets, '1. ' lists and bold. Needs the user's account.
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": {
"sender": "<sender>",
"recipient": "<recipient>",
"subject": "<subject>",
"body": "<body>"
},
"name": "compose_letter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Letter text including the salutation (e.g. 'Dear Sir or Madam,'), without closing or signature. Blank line = new paragraph; '- ' bullets, '1. ' numbered lists and **bold** work. Up to 20,000 characters. | |
| date | No | Date of the letter as an ISO date (YYYY-MM-DD), e.g. 2026-10-08. Default: today. | |
| color | No | "bw" = black and white, "color" = colour printing (costs more per page). Default "bw". | bw |
| place | No | Place printed before the date, usually the user's city, e.g. Berlin. Optional. | |
| duplex | No | true = print on both sides of the paper (fewer sheets, so a lighter letter); false = one side only. Default false. | |
| sender | Yes | The user's own name and address (any country), printed in the letter's sender block. Use the user's REAL full name, not an alias, nickname or pseudonym: for an account without sender details yet, this block is checked and saved as them; once the account has them, they stay as they are. The user's saved sender details (name and postal address) are printed at the top left of the envelope after "Sent on behalf of:" (their company name and business address instead, if the account has business details); undeliverable letters are returned to that address. | |
| closing | No | Closing phrase, e.g. 'Kind regards'. Default: the usual closing in the letter's language. | |
| subject | Yes | Subject line printed above the body, e.g. Cancellation of my contract no. 12345 (up to 200 characters). | |
| envelope | No | "DL" (220×110 mm, letter folded twice), "C5" (229×162 mm, folded once) or "C4" (324×229 mm, flat). Omit to use the smallest envelope that holds the sheets (recommended); one too small for the page count is refused. | |
| language | No | Language of the letter as an ISO 639-1 code, e.g. en, de, fr, es, pt, it or nl; sets the date format and the default closing. Default "en". | en |
| recipient | Yes | Recipient's postal address, printed in the letter's address field and on the envelope. Ask the user for missing fields. | |
| signature | No | Name printed under the closing, e.g. Max Mustermann. Default: the sender's name. | |
| references | No | Up to 5 reference lines printed above the subject, e.g. ["Customer no. 12345", "Contract no. 987"]. Optional. | |
| registered | No | true = registered mail: tracking number and signature on delivery, for an extra fee (also what "certified" letters, Einschreiben, lettre recommandée and carta certificada mean here; not a US certified-mail product). false = ordinary mail. Default false. Often wanted for cancellations and deadlines. |