Draft Gmail Message
draft_gmail_messageCreates Gmail draft emails for new messages, replies, and forwards, with optional attachments and Send As aliases, so you can review before sending.
Instructions
Creates a draft email in the user's Gmail account. Supports new, reply, and forward drafts with optional attachments. Supports Gmail's "Send As" feature to draft from configured alias addresses.
To save a forward as a draft for review, pass forward_message_id. The original subject, body (quoted with a "Forwarded message" header), and attachments are carried over. In forward mode, body (if any) is prepended as a note, subject is optional, and threading, reply, and signature options do not apply.
SCHEDULED SEND IS NOT AVAILABLE. Gmail's REST API exposes no send-time parameter; the Schedule send feature is web-UI only, and a message cannot be placed in the Scheduled folder through the API. Do not claim a message was scheduled. To deliver at a chosen time, create a draft with draft_gmail_message. An external scheduler must retain the message data to create and send a new message via send_gmail_message then, or call users.drafts.send with the draft ID returned by draft_gmail_message. Alternatively, let the user schedule the draft in the Gmail UI.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Optional CC email address. | |
| to | No | Optional recipient email address. | |
| bcc | No | Optional BCC email address. | |
| body | No | Email body. Required unless forwarding, where it becomes an optional note prepended above the quoted original. | |
| subject | No | Email subject. Required for a new draft. Optional when replying with thread_id (inherits the parent message's subject, adding 'Re:' only if absent) or when forwarding (then defaults to 'Fwd: <original subject>'). | |
| direction | No | Base text direction of the body. 'auto' (default) takes it from the first strong character (a right-to-left script gives 'rtl', anything else 'ltr'); 'ltr'/'rtl' force it. On a forward it orients the note. | auto |
| from_name | No | Optional sender display name (e.g., 'Peter Hartree'). If provided, the From header will be formatted as 'Name <email>'. | |
| reply_all | No | Whether to derive reply-all recipients from the thread: To = the sender being replied to, Cc = the other participants, excluding the authenticated account and from_email. Requires thread_id. Explicit to/cc win; when cc is omitted the sender being replied to is added to the derived Cc if they are not already in To. Defaults to false. | |
| thread_id | No | Optional Gmail thread ID to reply within. When in_reply_to is omitted, replies to the latest non-draft, non-trash message with an RFC Message-ID. | |
| from_email | No | Optional 'Send As' alias email address. Must be configured in Gmail settings (Settings > Accounts > Send mail as). If not provided, uses the account's default Send As address, falling back to the authenticated user's email when Gmail returns no usable Send-As entry or settings access is not authorized. | |
| references | No | Optional Message-ID ancestry chain. Normally omit when thread_id is provided; the server derives the chain through the selected reply target. | |
| attachments | No | Optional list of attachments. Each can have: 'url' (fetch from URL — works with MCP attachment URLs from get_drive_file_download_url / get_gmail_attachment_content), OR 'path' (file path, auto-encodes), OR 'content' (standard base64, not urlsafe) + 'filename'. Optional 'mime_type'. Optional 'content_id' (string) makes the attachment inline-rendered: it lands in a multipart/related part with `Content-ID: <content_id>` and `Content-Disposition: inline`, and the HTML body can reference it via `<img src="cid:<content_id>">` (RFC 2392). Without `content_id` the attachment is a regular multipart/mixed attachment. | |
| body_format | No | Email body format. Use 'plain' for plaintext or 'html' for HTML content. With 'html', write real markup; an entity-escaped body ('<div>') is rejected. | plain |
| in_reply_to | No | Optional RFC Message-ID to explicitly reply to a specific message (e.g., '<message123@gmail.com>'). Omit to reply to the latest eligible message in thread_id. | |
| quote_original | No | Whether to include the original message as a quoted reply. Only has an effect when thread_id is provided. Defaults to false. | |
| include_signature | No | Whether to append the Gmail signature from Settings > Signature when available. Defaults to true. | |
| user_google_email | Yes | The user's Google email address. Required for authentication. | |
| forward_message_id | No | Set to a Gmail message ID to save a forward of that message as a draft for review. The original subject, body, and (optionally) attachments are carried over; 'body' becomes an optional note prepended to the forward. | |
| include_forwarded_attachments | No | When forwarding, whether to include the original message's attachments. Ignored unless forward_message_id is set. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |