Skip to main content
Glama
SinoEdwards

Mail Agent MCP

by SinoEdwards

imap_get_latest_emails

Fetch recent emails from a folder in reverse chronological order to see new incoming messages or recent inbox items without search filters. Optionally fetch message bodies in the same request.

Instructions

Get the most recent emails from a folder, newest first. Use this for "what just came in?" / "show my latest inbox messages" when no search filter is needed. By default returns lightweight headers (uid, from, subject, date); set includeBody=true to also return the parsed body in one round-trip instead of paying the N+1 cost of calling imap_get_email per message. To filter by sender/subject/date instead, use imap_search_emails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of emails to retrieve
folderNoFolder nameINBOX
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 in the same round-trip and return it alongside headers (avoids the N+1 cost of calling imap_get_email per message). Body is rendered per `bodyFormat` and capped at `bodyMaxLength` characters per field. Off by default to preserve lightweight behavior.
bodyMaxLengthNoPer-message cap (in characters) for each rendered body field when `includeBody` is true. Defaults to 10000 to match `imap_get_email`.
Install Server

TDQS

A4.5/5.0
Behavior4/5

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

There are no annotations, so the description carries the full burden. It discloses the read-style behavior, newest-first ordering, lightweight header output, body rendering options, body length cap, and the one-round-trip performance tradeoff. It doesn't mention auth or error behavior, but those are minor for this kind of fetch tool.

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 four tight sentences: purpose, usage scenario, body/performance behavior, and alternative tool. Every sentence earns its place and there is no filler or restatement of the tool name.

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?

With no output schema, the description supplies enough return-shape details: lightweight headers by default, optional parsed body, and body rendering cap. It also covers the main decision an agent must make (whether to include bodies and whether to search instead), making correct invocation straightforward.

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 coverage is 100%, so the baseline is 3; the schema already documents all 7 parameters in detail. The description adds useful context about includeBody/bodyFormat semantics and the N+1 cost avoidance, but it doesn't substantially expand per-parameter guidance beyond what the schema provides.

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 and resource: "Get the most recent emails from a folder, newest first." It clearly identifies the payload shape (lightweight headers: uid, from, subject, date) and differentiates itself from siblings by naming imap_search_emails and imap_get_email.

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?

The description gives explicit invocation scenarios: "what just came in?" / "show my latest inbox messages" when no search filter is needed. It directly routes to imap_search_emails for sender/subject/date filters and explains when includeBody=true is preferable to calling imap_get_email per message.

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