update-saved-draft
Edits an existing IMAP draft's subject, body, recipients, or attachments after reviewing its current revision, with a dry-run preview and approval hashes before applying changes.
Instructions
Use when: editing an existing stored draft's subject, body, recipients or attachments after reviewing its current revision. IMAP-only: use an imap: id from the configured account's SPECIAL-USE Drafts mailbox. dryRun defaults to true and can show proposed changes. Returns: the current preview and UIDVALIDITY/UID/MIME SHA-256; after an update the new draftId and preview, with the old-revision cleanup result reported separately. Do not use when: creating a new message (use create-draft), editing a non-draft or an AppleScript-only account, or sending mail. Signed/encrypted, ambiguous or unpreviewable MIME is refused. Safety: changes a stored draft only; never calls SMTP or sends mail. Obtain approval for the changes and pass the current preview's approvedSha256 and approvedUidValidity with dryRun=false. APPEND is confirmed before targeted removal of the old UID. UIDPLUS is required to avoid global EXPUNGE. Unknown APPEND and cleanup failures must be inspected, never blindly retried.
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": {
"draftId": "<draftId>"
},
"name": "update-saved-draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Preview only by default. false applies the changes; never sends mail. | |
| changes | No | Partial patch. Omitted fields are preserved; [] clears To/Cc/Bcc. Adding/removing attachments is explicit. | |
| draftId | Yes | An imap: ID freshly listed in the account's SPECIAL-USE Drafts mailbox. Numeric IDs are refused. | |
| approvedSha256 | No | Current stored MIME SHA-256 from preview, required to apply changes. | |
| approvedUidValidity | No | Current mailbox UIDVALIDITY from preview, required to apply changes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| error | No | ||
| status | No | ||
| draftId | No | ||
| preview | No | ||
| proposed | No | ||
| sourceDraftId | No | ||
| sourceRemoved | No | true only after confirmed removal; omitted if cleanup's outcome is uncertain. |