Skip to main content
Glama

send_message

Destructive

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

NameRequiredDescriptionDefault
ccNo
toYes
bccNo
bodyYes
subjectYes
body_htmlNo
attachmentsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only give destructiveHint=true, so the description carries the rest and does it well: it discloses the confirmation form's contents, the exact decline/cancel/timeout/no-elicitation paths that leave an unsent draft, the version-specific degradation on 2026-07-28 connections, and the auto-accept hook caveat. That is exactly the irreversibility and side-effect context an agent needs before a destructive send.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical constraint is front-loaded in the first sentence, but the middle section is padded with protocol-version minutiae (2025-11-25 vs 2026-07-28, and a specific named client's current connection version) that will age badly and slow an agent's read. The Returns block also restates material an output schema already provides.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, seven-parameter tool with an output schema, the description covers the send/hold decision, every failure reason, and the recipient-flag vocabulary — more than enough to call it correctly. It loses a point only for duplicating the output schema's return shape rather than deferring to it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and does: each of the seven parameters is documented, including the string-or-list duality for to/cc/bcc and the nested attachment contract (local_path or content_base64, plus filename and mime_type with an explicit extension-guess-then-octet-stream fallback). This adds real meaning the bare schema cannot convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Send a new email message') and adds a scope qualifier ('new', plus the confirm-by-default behavior) that implicitly separates it from reply_to_message and send_draft. It stops short of naming those siblings explicitly, so an agent must infer the boundary rather than read it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The confirm-vs-direct decision is spelled out thoroughly: GMAIL_SEND=confirm saves a draft, GMAIL_SEND=direct sends immediately, and the handshake/version conditions that silently force draft behavior are stated. What is missing is explicit routing to alternatives — nothing says to use reply_to_message for replies or send_draft for an already-created draft.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools