create_draft
Create a new email draft, reply to a message, or forward one. Choose to send immediately or save as a draft.
Instructions
Create a draft (fresh, reply, or forward). Optionally send immediately.
Mail.app's actual primitive is the draft — every outgoing message is a draft until sent. This tool lets callers create one, optionally seeded from an existing message (reply or forward), and either save it for later or send it now.
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": "create_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | No | ||
| bcc | No | ||
| body | No | Body text. For reply/forward, a non-empty body REPLACES Mail's auto-quoted content; an empty body leaves the auto-quote intact (matches Mail.app's default reply behavior). | |
| subject | No | Subject. Required when both seeds are None. For reply/forward, ``None`` keeps Mail's ``Re:``/``Fwd:`` prefix. | |
| reply_to | No | Id of a message to reply to. Accepts either Mail.app's internal numeric id or an RFC 5322 Message-ID — pass the ``id`` field from any ``search_messages`` / ``get_messages`` row verbatim. Mutually exclusive with ``forward_of``. When set, ``to``/``cc`` recipients and ``subject`` are auto-derived from the original (override by passing them explicitly). | |
| send_now | No | ``False`` (default) saves as draft. ``True`` sends immediately and elicits user confirmation. | |
| body_html | No | Optional HTML body. When set, the draft is built as a multipart/alternative (HTML + a plain-text alternative taken from ``body``, or derived from the HTML when ``body`` is empty). HTML drafts are created over the clean IMAP path, so they REQUIRE IMAP credentials for the account and are limited to fresh save-as-draft: passing ``body_html`` with ``send_now`` or with ``reply_to``/``forward_of`` is rejected, and if IMAP can't engage the call fails (``error_type: "html_requires_imap"``) rather than silently downgrading to plain text. HTML is caller-trusted (not sanitized). (#251) | |
| reply_all | No | For ``reply_to`` only — use ``reply to all``. | |
| forward_of | No | Id of a message to forward. Accepts the same id forms as ``reply_to``. Mutually exclusive with ``reply_to``. ``to`` is required (recipient of the forward). | |
| from_account | No | Mail.app account name or UUID. ``None`` uses Mail's default; on a save-as-draft with exactly one enabled account, that account is adopted so the clean (no iOS quote bug) IMAP draft path can engage. | |
| seed_mailbox | No | Mailbox the reply_to/forward_of message lives in (e.g. the ``mailbox`` field from its ``search_messages`` row). Lets the clean save-as-draft path fetch the original directly so reply/forward drafts render without the iOS quote bug — supply it especially for replies to filed (non-INBOX) mail. Defaults to INBOX; a miss falls back transparently. | |
| template_name | No | Optional template to render for ``subject`` and ``body``. Caller-supplied ``subject``/``body`` override the rendered output. ``template_vars`` override auto-fills. | |
| template_vars | No | Variables to pass to the template renderer. Requires ``template_name``. | |
| attachment_paths | No | List of file paths to attach. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||