Update draft
update_draftModify a staged, unsent email draft to change recipients, subject, body, or attachments while preserving omitted fields and the draft ID.
Instructions
Edit a staged draft that has not been sent. Omitted fields keep their staged values; an empty recipient or attachments array clears that field. Files already attached are carried across untouched unless attachments is given, in which case the list is replaced wholesale — read the existing blobIds back with get_draft first if you mean to add one rather than swap them. The draftId stays the same across edits, so keep using the one create_draft returned. On a reply, text/html is the new part only: the quoted original is kept below it (quoteOriginal: false drops it, true adds one to a bare reply). On a forward staged with create_draft(forwardOf), text/html is the note only: the forwarded message is rebuilt below it. The previous version is not recoverable. If the draft has both a plain-text and an HTML body, pass both text and html or neither; replacing one would leave the other saying the old thing. The sender and the reply threading cannot be changed here; stage a new draft with create_draft instead, then retire this one with delete_draft.
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_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Replace the Cc recipients. Omit to keep them; pass an empty array to clear them. Each entry is a bare address (person@example.com) or the "Name <person@example.com>" form. | |
| to | No | Replace the To recipients. Omit to keep them; pass an empty array to clear them. Each entry is a bare address (person@example.com) or the "Name <person@example.com>" form. | |
| bcc | No | Replace the Bcc recipients. Omit to keep them; pass an empty array to clear them. Each entry is a bare address (person@example.com) or the "Name <person@example.com>" form. | |
| html | No | Replace the HTML body. On a reply, write only the new part: the quoted original is re-attached below it, so do not paste the quote from get_draft back in. Omit to keep the body. | |
| text | No | Replace the plain-text body. On a reply, write only the new part: the quoted original is re-attached below it, so do not paste the quote from get_draft back in. Omit to keep the body. | |
| draftId | Yes | The draft id, as returned by create_draft or list_drafts — edits do not change it — or a message id from search_emails with `mailbox: "Drafts"`. Editing a draft found that way returns the draftId to use from then on. | |
| subject | No | Replace the subject. Omit to keep it. | |
| attachments | No | Files to attach, at most 10. Each entry names its file either by `blobId` (already in the mailbox, or uploaded with upload_attachments — nothing passes through the conversation) or by base64 `content` (a small file you just generated); the `content` entries may come to at most 25 MB between them. A file path cannot be used: this server cannot read your disk — upload a local file with upload_attachments instead. Omit to keep the files already attached; pass an empty array to remove them all. Supplying the field replaces the whole list, so to add one more file, list the existing ones by the blobIds get_draft reports alongside the new one. | |
| quoteOriginal | No | On a reply, with `text` or `html`: whether the original is quoted below the new text. Defaults to whatever the staged draft does — unless the same call adds a `to`/`cc`/`bcc` recipient the original was not addressed to, where quoting would forward it to them, so the quote is left off. Pass false to drop the quote, true to add it to a bare reply or to quote it for a new recipient. |