update_draft
Replace an existing email draft's recipients, subject, body, and attachments without sending it, while preserving its draft ID and reply threading.
Instructions
Replace a draft's content without sending it. The draft keeps its ID.
The call's arguments replace the draft's old content: omitted cc, bcc, body_html, and attachments are removed, not kept. A reply draft stays in its thread, keeping its In-Reply-To and References headers, as long as the subject still matches the thread's (Gmail's threading rule). The draft's From (e.g. a send-as alias chosen in Gmail) is also kept.
Args: draft_id: The draft ID (from list_drafts or create_draft). to: Recipient email address, or a list of addresses. subject: Email subject line. body: Plain-text body. cc: Optional CC address or list of addresses. bcc: Optional BCC address or list of addresses. body_html: Optional HTML body (sent alongside the plain-text body). attachments: Optional list of attachment dicts to add. Each needs either local_path or content_base64, plus optional filename and mime_type (guessed from the filename's extension when omitted, else application/octet-stream). keep_attachments: When True, keep every part of the draft except its plain and HTML bodies (so every attachment get_draft lists), ahead of any in attachments. Inline images (parts with a Content-ID) stay inline with the new body_html, so its cid: references still resolve; without body_html they become ordinary attachments.
Returns: Draft id and nested message id/thread_id/label_ids. The message id changes on every update; the draft id doesn't. On failure, {"error": "..."}.
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": {
"draft_id": "<draft_id>",
"to": "<to>",
"subject": "<subject>",
"body": "<body>"
},
"name": "update_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | ||
| bcc | No | ||
| body | Yes | ||
| subject | Yes | ||
| draft_id | Yes | ||
| body_html | No | ||
| attachments | No | ||
| keep_attachments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||