Skip to main content
Glama
SinoEdwards

Mail Agent MCP

by SinoEdwards

imap_find_email_by_message_id

Locate an email by its RFC822 Message-ID across folders, even if moved or archived, and get its current folder and UID to use in follow-up actions like reply or fetch.

Instructions

Locate an email by its RFC822 Message-ID across folders and return its current { folder, uid } plus basic envelope. Robust to the message having been moved or archived (IMAP UIDs are folder-relative). Pass the returned folder + uid to imap_reply_to_email or imap_get_email. Without folders, searches Gmail \All Mail when present, else INBOX → Archive → Sent → remaining folders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
foldersNoExplicit folders to search, in order (overrides the default order)
accountIdYesAccount ID
messageIdYesRFC822 Message-ID, with or without angle brackets
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

Since no annotations are provided, the description carries the full behavioral burden. It discloses that the operation searches across folders, handles moved/archived messages, explains why (UIDs are folder-relative), and describes the folder-search fallback order. While it does not mention possible return when nothing is found or potential search cost, it provides substantial behavioral context beyond a simple verb phrase.

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, each carrying distinct useful information: what the tool returns, why it is reliable across moves, and what to do with the result. No filler or repetition.

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 tool with no output schema, the description adequately sketches the return shape ({ folder, uid } plus basic envelope) and the default behavior when folders is omitted. It could be more explicit about a not-found outcome or exact envelope contents, but the essential information an agent needs to select and call the tool correctly is present.

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 100%, so the schema already documents all three parameters. The description adds semantic value by explaining how the optional 'folders' parameter behaves (overrides default order) and that messageId accepts angle brackets or not, though the latter is already in the schema. This extra folder-behavior context pushes it above the baseline.

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 clearly states the specific verb ('Locate') and resource ('an email by its RFC822 Message-ID'), along with the concrete return value ('current { folder, uid } plus basic envelope'). This distinguishes it from sibling tools like imap_search_emails or imap_find_thread_messages, which serve different lookup or search purposes.

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 practical usage context: it is robust to moved/archived emails and specifies the default folder search order. It also tells the agent what to do with the result, by directly pointing to imap_reply_to_email or imap_get_email. It does not explicitly contrast with alternatives, but the distinctive message-ID-based purpose is clear enough.

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