Skip to main content
Glama

mail_reply_to_message

Reply to a received email inside its original thread, sending only to the sender or to all recipients when reply_all is enabled.

Instructions

Reply to one received message inside its thread (Re: subject, In-Reply-To and References, quoted original), to the sender or, with reply_all, to everyone.

Use when: the owner wants to answer a message you found with mail_search_messages. Not for a new conversation (use mail_send_message), passing the message to someone else (use mail_forward_message), or editing a reply already saved as a draft (use mail_update_draft). Parameters:

  • folder, uid and uidvalidity come from the same mail_search_messages result; omitting uidvalidity skips the renumbering check.

  • Omit to and the reply goes to Reply-To, else From; for a message you sent yourself it goes to that message's To.

  • An explicit to replaces the computed To, but reply_all=true still adds the original To and Cc. cc is added to the computed Cc.

  • Your own address is removed unless it is the only recipient.

  • body is only your new text: the signature follows it, then 'On , wrote:' and the quote unless quote_original=false. An HTML quote is built only when body_html is given. Behavior:

  • Same gates as mail_send_message: with SEND_REQUIRES_APPROVAL=true (the default) the reply is queued (or saved to Drafts on a local server), NOT sent; with it off it goes out at once; draft=true only saves it.

  • Once sent, a copy goes to Sent and the original is flagged Answered.

  • Every call is a new message. Returns: the mail_send_message result (status, recipients, message_id, subject, to, cc; drafts carry no uid, so find them with mail_search_messages(folder='Drafts')) plus in_reply_to, and original_marked_answered when sent now. Errors:

  • 'No message with uid' or out-of-date uids: search again.

  • 'Could not determine a recipient': pass to.

  • the recipient and SMTP errors of mail_send_message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ccNoCc addresses (visible to all recipients).
toNoOverride the computed recipients. Omit to reply to the sender (and others if reply_all).
bccNoBcc addresses (hidden from other recipients).
uidYesMessage uid in that folder (from mail_search_messages).
bodyYesYour reply text only; the quoted original is added automatically.
draftNotrue = save to Drafts for the user to review instead of sending.
folderYesMail folder, e.g. INBOX, Sent, Archive or a custom name.
body_htmlNoOptional HTML version of the body; the plain-text 'body' is always required.
reply_allNotrue = also reply to the other To/Cc recipients, not just the sender.
attachmentsNoFiles to attach (from mail_get_attachment as is; from drive_get_file, name and data_base64 go in filename and content_base64).
uidvalidityNoThe 'uidvalidity' from the result the uid came from: a renumbered folder is then refused, not misread.
quote_originalNotrue (default) = include the quoted original below your reply.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "mail_reply_to_messageDictOutput",
      -  "type": "object"
      -}New value: +null
  2. Addedv0.12.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive, open-world behavior, and the description adds substantial context: approval gating, queuing versus immediate sending, draft saving, Sent-copy creation, and original-message Answered flagging. It also documents return contents and likely errors without contradicting the annotations.

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

Conciseness5/5

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

Despite being detailed, it is front-loaded with purpose and structured into Use when, Parameters, Behavior, Returns, and Errors. Every section earns its place for a 12-parameter tool with side effects and approval gates.

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

Completeness5/5

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

For a complex reply tool with 12 parameters, no output schema, and partial annotation coverage, the description is complete. It covers selection guidance, parameter semantics, operational behavior, return values, and common errors.

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 100%, so the baseline would be 3, but the description adds meaningful semantics beyond the schema. It explains recipient computation, reply_all interaction with To/Cc, cc addition, own-address removal, uidvalidity renumbering protection, quote_original and body_html behavior, and draft-only behavior.

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?

The description states a specific verb and resource: reply to one received message inside its thread. It immediately distinguishes this from sibling tools by naming alternatives for new conversations (mail_send_message), forwarding (mail_forward_message), and draft editing (mail_update_draft).

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

Usage Guidelines5/5

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

It explicitly says when to use it ('the owner wants to answer a message you found with mail_search_messages') and when not to use it, naming the correct alternative tools for each excluded case. This leaves no ambiguity about tool selection.

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