Draft invoice e-mail in Mail.app
draft_invoice_emailCreates a review-ready email draft in Apple Mail with the invoice PDF attached, prefilled subject, and optional recipient so the user can review and send it; it never sends.
Instructions
Open a DRAFT e-mail in Apple Mail.app with the invoice PDF attached, subject 'Faktura — ', ready for the user to review and send. Never sends anything.
macOS only (drives Mail.app via osascript and brings it to the front); fails elsewhere or if the PDF file is missing. Not idempotent: each call creates another draft. Use it right after issue_invoice or issue_credit_note; afterwards, when the money arrives, use mark_paid. Returns a confirmation with the recipient.
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": {
"number": "<number>"
},
"name": "draft_invoice_email"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Recipient e-mail address. Omitted = the e-mail stored on the invoice's customer; if there is none, the draft has no recipient. | |
| number | Yes | Issued invoice number from the ledger, e.g. '2610001'. | |
| message | No | Full e-mail body to use instead of the default Czech text (which states the number, amount, due date, account, IBAN and variable symbol). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |