gws-mcp__gmail_update_draft
Update an existing draft email in Gmail. This fully replaces the draft's message content (Gmail API does not support partial edits), attachments included: files the draft held, including any attached by a file reference, are dropped unless they are passed again in attachments. If thread_id is omitted, the tool preserves the existing thread automatically. The account's Gmail signature is added to the draft automatically, as Gmail's own Compose does, so do not write a sign-off or signature in the body yourself; pass signature: false to leave it out. The signature goes in the draft's HTML part, so a plain-text body is stored as multipart/alternative when the account has one. The response's signature field reports what happened.
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>"
},
"name": "gws-mcp__gmail_update_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | CC recipients, comma-separated | |
| to | Yes | Recipient email address(es), comma-separated | |
| bcc | No | BCC recipients, comma-separated | |
| body | No | Plain-text email body. When html_body is also given, this becomes the text/plain alternative part shown by plain-text clients. One of body or html_body is required. | |
| account | No | Optional email address of the connected account to use (e.g. 'user@gmail.com'). If omitted, the default account is used. | |
| subject | Yes | Email subject line | |
| draft_id | Yes | The Gmail draft ID to update | |
| html_body | No | HTML email body. The message is sent as multipart/alternative with a text/plain fallback part (body if provided, otherwise text derived from the HTML), so plain-text clients still render something readable. | |
| signature | No | Set false to write the draft without the account's Gmail signature, and to skip the lookup entirely. Defaults to true. | |
| thread_id | No | Thread ID to preserve threading. If omitted, the existing draft's thread is preserved automatically. | |
| attachments | No | Files to send with the message, at most 10, 25 MB in total. Each entry is a Drive file id as a string, or {"file_id": "<id>", "as": "<format>"} to send a Google Doc, Sheet or Slides deck as a file, or a file reference. Formats: Docs pdf, docx, txt, html, md, rtf, odt, epub; Sheets pdf, xlsx, csv, tsv, html, ods; Slides pdf, pptx, txt, odp. csv and tsv export one tab: add "tab": "<title>" to choose it, otherwise the first tab goes, and the response says which. A Sheet as html arrives as a .zip of pages, one per tab; Slides as txt is the slides' visible text only. Google Docs, Sheets and Slides passed by id alone are sent as links in the message, the way Gmail does, not as files. Other Drive files are attached as they are. A file reference is an object with a "type": {"type": "gmail_message", "message_id": "<id>"} attaches an email as its original .eml, {"type": "gmail_attachment", "message_id": "<id>", "part_id": "<part id>"} one attachment of an email, {"type": "drive_file", "file_id": "<id>"} a Drive file as stored, {"type": "drive_export", "file_id": "<id>", "format": "pdf"} a Google file exported, {"type": "content", "name": "<file name>", "base64": "<standard base64, one unbroken string>"} a file the caller already holds, at most 1 MB, and {"type": "upload", "upload_id": "<id>"} a file the user sent through file_upload_link. A reference may carry an "account" naming the connected Google account that holds the email or file. Several entries may be references. Two attachments may not share a filename. To show an image in the body rather than at the bottom, reference it in html_body as <img src="cid:FILENAME">, where FILENAME is its Drive filename with any character other than letters, digits, dot, dash and underscore replaced by an underscore. Sharing a Drive link is the sender's responsibility; nothing here changes who can open a file. The response's attachments field reports each file as attached, inline, linked or exported, with its size and the SHA-256 of the bytes that went into the message; a file sent as a link has neither. |