Save draft
save_draftSave a NEW draft into Mail.app's Drafts folder. This tool never sends it (send_email sends, if the user's permissions allow). sender must be one of your own addresses; it decides which account the draft is filed under. The returned attachments list is read back from the saved draft, not echoed, and the call fails if Mail drops one. cc copies people properly instead of crowding them onto the To line. Returns draft_id (the draft's Message-ID) for update_draft, but see that tool: Mail re-syncs drafts and rotates the id within a minute or so. This starts a NEW conversation: it cannot carry In-Reply-To, so a recipient sees it as unrelated to anything. To answer an existing message so it threads, use save_reply_draft instead. category (e.g. 'Work') refuses a sender outside accounts with that label. By default the saved draft (new or reply) stays open in a Mail window so the user can review, edit and send it there; the user can turn that off in Keeploop. Pass leave_open=false to save quietly or true to force the window. Omit it to follow the user's setting. left_open says what happened. Accounts are labelled (Personal, Work, ...). For a personal task use the Personal accounts; call list_categories if unsure. Recipients must be email addresses. Given only a person's name, look the address up first (search_contacts when it is listed, else search_mail); if more than one person or address could be meant, ask the user. Never guess an address. attachments takes files already in the user's mail as {mail_id, attachment_id} (from get_email or find_attachments; Mail downloads one it has not stored yet), and absolute paths of files in the user's home folder (not hidden ones or ~/Library; from web and phone apps only as the user's Attach files from this Mac permission allows). Up to 18 MB in total. The user sees every file's name and size in the confirmation. Requires Keeploop Pro.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | ||
| body | Yes | ||
| sender | Yes | ||
| subject | Yes | ||
| category | No | ||
| leave_open | No | ||
| attachments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| note | No | ||
| account | Yes | ||
| subject | Yes | ||
| draft_id | No | ||
| left_open | No | ||
| attachments | No | ||
| saved_to_drafts | Yes | ||
| replaced_draft_id | No |