Replace a draft
update_draftReplace an email draft's body, recipients, and attachments as a whole, optionally keeping chosen attachments; saves changes without sending. Read it first to preserve parts you want.
Instructions
Replace a draft as a whole: what is left out is gone afterwards, attachments too unless keep_attachments names them. Read it with get_message first to keep parts of it. A draft that answers a message keeps that link with original_id, action and quote=false, as its text holds the quote already. Use the id it answers with from now on: some providers store the draft under a new one. Nothing is sent.
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": {
"account_id": "<account_id>",
"draft_id": "<draft_id>"
},
"name": "update_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Addresses, plain or as Name <address> | |
| to | No | Addresses, plain or as Name <address> | |
| bcc | No | Addresses, plain or as Name <address> | |
| html | No | The body as HTML, for formatting. Inline styles only (style=...), since many mail programs drop <style> blocks. Without text, the text part is made from it | |
| text | No | The body as plain text | |
| quote | No | With original_id: false adds nothing of the original, no quote of a reply and no forwarded message. The link to it stays | |
| action | No | With original_id: reply to its sender, reply_all to everyone it went to, or forward it | reply |
| subject | No | The subject. Left empty with original_id: the original's, after Re: or Fwd: | |
| draft_id | Yes | A draft of that account, by the id list_drafts or create_draft answers | |
| reply_to | No | Where answers should go instead of this account's address | |
| account_id | Yes | The account, by the id list_accounts names | |
| forward_as | No | A forward: inline quotes the original below the text with its attachments, attachment attaches it unchanged as a file | inline |
| attach_from | No | Attachments of other mail of this account, attached as they are, before attachments. Needs the right to read that mail | |
| attachments | No | Files to attach, 25 MiB together at most | |
| original_id | No | A message to answer or forward. Recipients and quote follow | |
| keep_attachments | No | Ids of the stored draft's attachments to keep |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| to | Yes | ||
| date | Yes | ||
| subject | Yes |