Skip to main content
Glama
SinoEdwards

Mail Agent MCP

by SinoEdwards

imap_find_thread_messages

Find messages in a search folder that belong to the same conversation threads as messages in a source folder, catching replies that arrived after sorting. Optionally include parsed bodies in the same round-trip.

Instructions

Find messages in searchFolder that belong to the same conversation threads as messages already in sourceFolder. Useful for catching replies that arrived after a thread was sorted. Works on any IMAP server (uses RFC 3501 HEADER search on In-Reply-To and References). Set includeBody=true to also return the parsed body for each found thread message in one round-trip — avoids the N+1 cost of calling imap_get_email per thread member.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdNoAccount ID (from imap_list_accounts). Optional if accountName is given or only one account is configured.
bodyFormatNoHow to render the body when `includeBody` is true. Mirrors `imap_get_email` — "markdown" (default) returns clean Markdown; "text" returns plain text; "html" returns raw HTML; "auto" prefers substantive text/plain, else Markdown.markdown
accountNameNoAccount name instead of accountId. Optional if accountId is given or only one account is configured.
includeBodyNoIf true, also fetch the parsed message body for each found thread message in the same round-trip and return it alongside headers (avoids the N+1 cost of calling imap_get_email per thread member). Body is rendered per `bodyFormat` and capped at `bodyMaxLength` characters per field.
searchFolderNoFolder to search for related thread messages (default: INBOX)INBOX
sourceFolderYesFolder containing the already-sorted thread messages (e.g. "Review.Articles")
bodyMaxLengthNoPer-message cap (in characters) for each rendered body field when `includeBody` is true. Defaults to 10000 to match `imap_get_email`.
searchReferencesNoAlso search the References header for multi-level threads (default: true)
Install Server

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden. It reveals the underlying search method (RFC 3501 HEADER search on In-Reply-To and References), the compatibility guarantee ('works on any IMAP server'), and the round-trip optimization when `includeBody` is true. This goes well beyond a simple purpose statement, though it omits details about return format and failure modes.

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?

Three sentences, all dense with useful information: the core operation, a practical use case, the technical mechanism, and the key optionality with its performance rationale. No filler or redundant verbiage.

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

Completeness3/5

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

No output schema exists, so the description should clarify what the tool returns. It says 'found thread messages' and optionally 'parsed body', but does not describe the shape of the result set (e.g., array of headers, message objects, field names). The schema covers defaults and parameter richness well, but the output contract is a real gap for an agent. Thus not complete enough for a 4.

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

Parameters3/5

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

Schema description coverage is 100% and the schema already explains all parameters, including `includeBody`'se N+1 benefit and `bodyFormat` behavior. The description mostly reinforces this same information rather than adding new parameter semantics. It does clarify the relationship between `sourceFolder` and `searchFolder`, but that is largely inferable from the schema too. Baseline 3 is appropriate.

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 precise operation: find messages in `searchFolder` that belong to the same conversation threads as messages in `sourceFolder`. This clearly distinguishes it from general search tools like `imap_search_emails` or single-message lookup tools like `imap_find_email_by_message_id`, and it names the mechanism (RFC 3501 HEADER search).

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 description gives a concrete use case: 'catching replies that arrived after a thread was sorted.' It also provides guidance on when to set `includeBody=true` to avoid N+1 round-trips to `imap_get_email`. However, it does not explicitly exclude alternative tools or state when not to use it, so it falls just short of a 5.

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

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/SinoEdwards/mail-agent-mcp'

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