Skip to main content
Glama
hgn

Notmuch

by hgn

Prepare mail reply

mail_prepare_reply
Read-only

Compute reply or forward headers and quoted body for an email message. Supports reply, reply-all, and forward modes with optional quoting.

Instructions

Derive reply/forward headers and the quoted or forwarded body.

This is read-only: it computes what a reply or forward should look like but writes nothing. Pass the result's To/Cc/Subject/In-Reply-To to mail_create_draft (draft tier) if you want it actually saved as a draft.

Args: message_id: A Message-ID as seen in mail_search/mail_read_thread output. quote: Whether to include the original body (quoted with '> ' for reply/reply-all, or as a labelled forwarded block for forward). mode: 'reply' (sender only, honouring Reply-To), 'reply-all' (all original recipients minus your own configured addresses, honouring Mail-Followup-To, which is what mailing lists set and what makes the difference between a correct reply and an embarrassing one), or 'forward' (no In-Reply-To/References, subject gets exactly one 'Fwd:' prefix, body is a labelled forwarded block with the original headers, not an interleaved quote).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoreply
quoteNo
message_idYes
Behavior5/5

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

The description reinforces the readOnlyHint annotation by stating it 'computes' and 'writes nothing.' It adds behavioral details such as quoting behavior ('> ' for replies, labelled forwarded blocks for forwards), subject prefix rules ('Fwd:' exactly once), and header handling (In-Reply-To/References). This goes well beyond the annotation alone.

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?

The description is front-loaded with a one-sentence summary, followed by a read-only note and a direct pointer to mail_create_draft. The Args section is cleanly formatted and every sentence adds value – no fluff or repetition of schema metadata.

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?

Given the tool has no output schema and only three parameters, the description covers the tool's purpose, output (headers and body), mode variations, and the follow-up action. It also clarifies the read-only nature, making it complete for an agent to select and invoke correctly.

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 coverage is 0%, so the description compensates by defining message_id as a Message-ID from mail_search/mail_read_thread output, quote as including the original body with specific formatting, and mode with three detailed options including Mail-Followup-To semantics. Each parameter is fully explained beyond the schema's type/default fields.

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 opens with a specific verb ('Derive') plus the resource ('reply/forward headers and the quoted or forwarded body'), clearly distinguishing it from read-only tools like mail_read_message and mail_read_thread. It also names the output artifacts (To/Cc/Subject/In-Reply-To) and the body format, making the tool's function unmistakable.

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 instructs the agent to pass the result to mail_create_draft for persistence, and it specifies that this tool itself writes nothing, establishing when to use it versus the draft-saving alternative. The mode parameter is explained with concrete semantics (reply/reply-all/forward) and pitfalls (honoring Mail-Followup-To), giving clear usage context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hgn/mcp-server-notmuch'

If you have feedback or need assistance with the MCP directory API, please join our Discord server