Print and Mail Company
v1.0.0Print and mail real letters worldwide from the EU, incl.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_price_quote Get price quote
Use this when the user asks what it costs to send a physical letter by post (snail mail), including a registered letter. Returns the exact total incl. VAT (for a signed-in EU business customer with a confirmed VAT number: excl. VAT under the reverse charge), the line items, the envelope, the postal size class and zone and the typical delivery time for a page count, destination country and print options. Letters are printed and posted in Europe, so the sender can be anywhere in the world. Note: registered mail is international registered mail with tracking and signature on delivery; "certified"…
| Parameter | Type | Description |
|---|---|---|
country * | string | Destination country as an ISO 3166-1 alpha-2 code, e.g. DE, FR or US (list_destinations lists them all). |
pages * | integer | Number of pages in the PDF, a whole number from 1 to 250, e.g. 2. |
color | string | "bw" = black and white, "color" = colour printing (costs more per page). Default "bw". |
currency | string | Currency for the total: "EUR", "USD", "GBP" or "CHF". Prices are set in EUR; for USD, GBP or CHF the result adds the total converted at the ECB rate plus a currency margin. Default "EUR". |
duplex | boolean | true = print on both sides of the paper (fewer sheets, so a lighter letter); false = one side only. Default false. |
envelope | string | "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… |
postal_code | string | Destination postcode, e.g. 07001. Optional: it only changes the price for the Spanish and Portuguese islands and enclaves (Balearic and Canary Islands, Ceuta, Melilla, Madeira, Azores). |
registered | boolean | 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 certifie… |
list_destinations List destinations
Use this when the user asks whether a letter can be posted to a country, or which countries can be reached. Without country: all destination countries with their postage zone. With country: that country's zone, the price of a 1-page standard and registered letter, and the typical delivery time. Works without sign-in. Letters only, no parcels.
| Parameter | Type | Description |
|---|---|---|
country | string | ISO 3166-1 alpha-2 code of one country, e.g. DE: returns its zone, 1-page prices and delivery time. Omit to list every destination country. |
check_pdf_margins Check PDF for printing
Use this when the user has a PDF they want printed and posted and it should be checked first: verifies the page size (A4 or US Letter) and the required free margin on every side, and lists the pages that need changes. We print on the paper size uploaded (printed_on): A4 on A4, US Letter on US Letter (for a recipient outside the US, Canada and US territories the user may choose A4 instead when sending); a PDF mixing A4 and US Letter pages is printed on A4, its Letter pages centred at 100 % or scaled down slightly when content comes close to the edge (us_letter_note, pages[].scale_percent). Deci…
| Parameter | Type | Description |
|---|---|---|
pdf_base64 | string | The PDF file as base64 (a data:application/pdf;base64, prefix is fine), for files up to about 3 MB. Pass pdf_url or pdf_base64. Larger files: pass pdf_url, or use create_upload_link. |
pdf_url | string | Public https URL of the PDF (A4 or US Letter pages), e.g. https://example.com/letter.pdf. Pass pdf_url or pdf_base64. |
compose_letter Compose a letter
Use 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 an…
| Parameter | Type | Description |
|---|---|---|
body * | string | 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 character… |
recipient * | object | Recipient's postal address, printed in the letter's address field and on the envelope. Ask the user for missing fields. |
sender * | object | 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… |
subject * | string | Subject line printed above the body, e.g. Cancellation of my contract no. 12345 (up to 200 characters). |
closing | string | Closing phrase, e.g. 'Kind regards'. Default: the usual closing in the letter's language. |
color | string | "bw" = black and white, "color" = colour printing (costs more per page). Default "bw". |
date | string | Date of the letter as an ISO date (YYYY-MM-DD), e.g. 2026-10-08. Default: today. |
duplex | boolean | true = print on both sides of the paper (fewer sheets, so a lighter letter); false = one side only. Default false. |
envelope | string | "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… |
language | string | 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". |
place | string | Place printed before the date, usually the user's city, e.g. Berlin. Optional. |
references | array | Up to 5 reference lines printed above the subject, e.g. ["Customer no. 12345", "Contract no. 987"]. Optional. |
registered | boolean | 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 certifie… |
signature | string | Name printed under the closing, e.g. Max Mustermann. Default: the sender's name. |
upload_document Upload a PDF
Use this when the user already has a PDF (public https URL or base64) that should be printed and posted. Stores the file in the user's account, runs the print check (A4 or US Letter, free margins; printed_on says the paper: US Letter PDFs are printed on US Letter, a PDF mixing A4 and US Letter pages on A4, see us_letter_note; decide by compliant, as all_pages_a4 is false for a US Letter PDF) and returns document_id for create_letter. If the check fails, call fix_document_margins or ask the user for a corrected file. For a file on the user's own device, use create_upload_link instead. Sends not…
| Parameter | Type | Description |
|---|---|---|
file_name | string | Name to store the file under, e.g. cancellation.pdf. Default: the name from the URL, or "document.pdf". |
pdf_base64 | string | The PDF file as base64 (a data:application/pdf;base64, prefix is fine), for files up to about 3 MB. Pass pdf_url or pdf_base64. Larger files: pass pdf_url, or use create_upload_link. |
pdf_url | string | Public https URL of the PDF (A4 or US Letter pages), e.g. https://example.com/letter.pdf. Pass pdf_url or pdf_base64. |
fix_document_margins Fix document margins
Use this when an uploaded PDF fails the print check because content is too close to the edge or pages are neither A4 nor US Letter. mode "shrink" (default) scales the affected pages down slightly and centres them on their paper (US Letter for a US Letter PDF, else A4); nothing is lost. mode "crop" keeps pages at 100 % and removes everything inside the margin band, so that content is NOT printed (pages of other sizes are first fitted onto A4). The US Letter pages of a mixed PDF that already fit on A4 keep their placement. The original upload is kept; calling again with the other mode replaces t…
| Parameter | Type | Description |
|---|---|---|
document_id * | string | document_id returned by upload_document or compose_letter, e.g. doc_2h7k9m4q8x1v3c6b0n5p. |
mode | string | "shrink" = scale pages down slightly, nothing lost; "crop" = keep 100 % size and cut off everything inside the margin (that content is not printed). Default "shrink". |
create_upload_link Create upload link
Use this when the user wants to post a PDF that is on their own device and cannot be passed as a URL or base64. Creates a private upload page (valid 60 minutes); give the URL to the user, and once they have uploaded, pass upload_id to create_letter. Sends nothing. Needs the user's account.
create_letter Create letter draft
Use this when the user has an uploaded PDF (document_id, or upload_id from create_upload_link) and a recipient address and wants it posted by ordinary or registered mail; registered mail is international registered mail with tracking and signature on delivery; "certified" letters, Einschreiben, lettre recommandée and carta certificada mean this here (not a US certified-mail product). Creates a draft with the exact total in the user's currency. Nothing is sent or charged; call send_letter only after the user confirms. Every envelope shows the user as the sender at the top left ("Sent on behalf…
| Parameter | Type | Description |
|---|---|---|
recipient * | object | Recipient's postal address, printed on the envelope. Ask the user for missing fields. |
color | string | "bw" = black and white, "color" = colour printing (costs more per page). Default "bw". |
document_id | string | The PDF to post: document_id from upload_document or compose_letter, e.g. doc_2h7k9m4q8x1v3c6b0n5p. Pass document_id or upload_id. |
duplex | boolean | true = print on both sides of the paper (fewer sheets, so a lighter letter); false = one side only. Default false. |
envelope | string | "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… |
paper_size | string | Only for a US Letter PDF to a recipient outside US, CA, PR, VI, GU, AS, MP (the US, Canada and US territories): "a4" = shrink to A4 (recommended), "us_letter" = keep US Letter. Ask the user; same pric… |
registered | boolean | 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 certifie… |
sender | object | The user's own sender details: their REAL full name (first and last name, not an alias, nickname or pseudonym) and postal address, any country. Optional: needed only while the account has no sender de… |
upload_id | string | upload_id from create_upload_link, once the user has uploaded the PDF on that page. Pass document_id or upload_id. |
send_letter Send letter (charges credit)
Use this when the user has explicitly confirmed a specific draft letter (recipient, content and total price) and wants it printed and posted. Pays the letter from the user's prepaid credit and releases it to print; it can be cancelled with cancel_letter only until production starts. Only call this after that confirmation and after the user agreed to the Terms (https://printandmailcompany.com/en/legal/terms) and to printing starting immediately (which ends the consumer right of withdrawal once printed). If credit is too low, the result contains a payment link for the user; the assistant cannot…
| Parameter | Type | Description |
|---|---|---|
confirm * | boolean | Must be true: the user explicitly confirmed sending this letter (recipient, content and total price). |
letter_id * | string | letter_id of the draft the user confirmed, from create_letter or compose_letter, e.g. ltr_8f3k2m9q4x7v1c6b0n5p. Sending charges its total to the user's prepaid credit. |
user_accepted_terms * | boolean | Must be true: the user agreed to the Terms and to the immediate start of printing. |
paper_size | string | The user's choice for a US Letter PDF to a recipient outside the US, Canada and US territories: "a4" = shrink to A4 (recommended), "us_letter" = keep US Letter. Same price. Saved on the draft before p… |
sender | object | The user's own sender details: their REAL full name (first and last name, not an alias, nickname or pseudonym) and postal address, any country. Optional: needed only while the account has no sender de… |
get_letter Get letter
Use this when the user asks about a letter they created here: status (draft, paid, in_production, printed, posted, cancelled, returned), tracking number for registered mail, and price. Look up by letter_id or reference (PM-XXXXXX). Changes nothing. Needs the user's account.
| Parameter | Type | Description |
|---|---|---|
letter_id | string | letter_id from create_letter, compose_letter or list_letters, e.g. ltr_8f3k2m9q4x7v1c6b0n5p. Pass letter_id or reference. |
reference | string | The letter's reference as shown to the user, format PM-XXXXXX, e.g. PM-7K3QH9. Pass letter_id or reference. |
list_letters List letters
Use this when the user wants to see their recent letters, optionally filtered by status. Returns status, recipient, price and tracking number per letter. Changes nothing. Needs the user's account.
| Parameter | Type | Description |
|---|---|---|
limit | integer | How many letters to return, newest first: a whole number from 1 to 50. Default 10. |
status | string | Only letters with this status, e.g. draft or posted. Omit for letters in any status. |
cancel_letter Cancel letter
Use this when the user wants to stop a letter they created here: cancels a draft, or a paid letter that has not gone into production yet, and returns the amount to the user's credit. Letters already printed or posted cannot be recalled. This cancels our letter, not a contract the user has with someone else (for that, compose_letter writes the cancellation letter). Ask the user before cancelling. Needs the user's account.
| Parameter | Type | Description |
|---|---|---|
letter_id * | string | letter_id of the letter to cancel, from create_letter, compose_letter or list_letters, e.g. ltr_8f3k2m9q4x7v1c6b0n5p. Only drafts and paid letters not yet in production can be cancelled. |
get_balance Get credit balance
Use this when the user asks how much prepaid credit they have, or to check before sending that the credit covers a letter. Returns the credit, the account currency and the minimum top-up. Changes nothing. Needs the user's account.
create_topup_link Create payment link
Use this when the user needs to add credit, or to pay one specific draft letter by card. Returns a link to the payment page on printandmailcompany.com; give it to the user, who pays there. The assistant cannot pay, and calling this tool charges nothing. Needs the user's account.
| Parameter | Type | Description |
|---|---|---|
letter_id | string | letter_id of a draft, e.g. ltr_8f3k2m9q4x7v1c6b0n5p: the link then pays that letter by card. Omit for a link to add prepaid credit. |