Skip to main content
Glama

reply_to_message

Destructive

Sends a threaded email reply to an existing message, fetching original headers so Gmail groups it correctly. Saves it as a draft for user confirmation by default, or sends immediately in direct mode.

Instructions

Send a reply in an existing thread, after the user confirms it (by default).

Fetches the original message for Subject / Message-ID / References headers and sets the reply's threadId so Gmail groups it correctly.

By default (GMAIL_SEND=confirm) the reply is saved as a draft in the original thread and sent only when the user confirms it, exactly as send_message describes; otherwise it waits in Gmail's Drafts folder. GMAIL_SEND=direct sends at once.

Args: message_id: ID of the message being replied to. body: Plain-text reply body. body_html: Optional HTML reply body. reply_all: When True, also include the original To and Cc recipients in addition to the reply target.

Recipients follow standard mail-client rules: the reply goes to the original's Reply-To if it has one, otherwise its From. Replying to a message you sent yourself goes to that message's original To (or its Cc, if nobody else was in To) instead. Your own addresses, including send-as aliases, are left off the recipients unless nobody else is on the message.

Returns: The same shapes as send_message: sent true with the sent message id, thread_id, and label_ids, or sent false with the held draft. A reply_all, or a reply to your own sent message, also has a warning when your own addresses couldn't be fully looked up (so you may be among the recipients). 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": {
      "message_id": "<message_id>",
      "body": "<body>"
    },
    "name": "reply_to_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYes
body_htmlNo
reply_allNo
message_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the destructiveHint annotation: it discloses that the reply is saved as a draft by default, the GMAIL_SEND=direct alternative, how Subject/Message-ID/References headers and threadId are derived, recipient resolution rules (Reply-To, From, self-replies, alias exclusion), the warning case, and the error shape.

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

Conciseness4/5

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

Front-loads the core action and follows with behavior and args sections in a readable order. The Returns block partly restates the existing output schema, which is some wasted space, but nothing is confusing.

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?

Covers the ambiguities that matter for a threaded-reply mutation tool: default draft vs immediate send, recipient derivation, and failure shape. With an output schema present, the return-value detail is redundant rather than necessary, so it falls just short of fully complete.

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

Parameters4/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 carry the load, and it does: it documents message_id, body, body_html, and adds real semantics for reply_all (includes original To and Cc in addition to the reply target). Minor gap: no format or length constraints on body/body_html.

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

Purpose5/5

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

States a specific verb and resource ('Send a reply in an existing thread'), which distinguishes it from send_message (new message) and create_draft without needing to open either schema.

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?

Explains the default confirm-vs-direct behavior and points to send_message for the shared draft/send semantics. It doesn't explicitly say 'use send_message instead when starting a new thread,' but the 'existing thread' framing implies the boundary.

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