send_message
Compose and send Gmail emails with CC, BCC, HTML body, and attachments; messages are saved as drafts until the user confirms the send.
Instructions
Send a new email message, after the user confirms it (by default).
By default (GMAIL_SEND=confirm) the message is saved as a Gmail draft and sent only when the user confirms it in a form the MCP client shows, which lists the sender, every recipient, the subject, attachment names, the start of the body, and any recipient flags. Declining, cancelling, no answer, or a client that can't show the form leaves it as an unsent draft. Confirmation needs a client on the 2025-11-25 handshake; on 2026-07-28 connections mail stays a draft. Claude Code currently connects on 2026-07-28, so from it every send is held as a draft. A client hook that auto-accepts confirmations with a yes makes this the same as GMAIL_SEND=direct, which sends at once.
Args: 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. 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).
Returns: Once sent: sent true, the sent message id, thread_id, and label_ids, plus (under confirm) draft_id and recipient_flags. If not sent: sent false, reason (no_elicitation, declined, cancelled, timeout, error, or changed), draft_id, message {id, thread_id, label_ids}, recipient_flags (each {flag, message, ...}: outside_organization, many_recipients, hidden_recipients, or outside_organization_unchecked), and a note saying the email is waiting in Gmail's Drafts folder. 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": {
"to": "<to>",
"subject": "<subject>",
"body": "<body>"
},
"name": "send_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | ||
| bcc | No | ||
| body | Yes | ||
| subject | Yes | ||
| body_html | No | ||
| attachments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||