Skip to main content
Glama
LeeFlannery

imap-mcp

by LeeFlannery

search_emails

Search emails across multiple IMAP accounts by matching text in sender, subject, or body, returning newest first with optional date and account filters.

Instructions

Search emails across from/subject/body text, newest first.

query: free text; matched against sender, subject, and body (IMAP OR).
account: omit to search ALL enabled accounts.
since: ISO date (YYYY-MM-DD) lower bound, optional.
limit: max rows (per account when merging).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
sinceNo
accountNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the transparency burden and does well: it discloses search fields, IMAP OR matching, account-scoping behavior, ISO date bound, and per-account limit merging. It avoids describing return values that the output schema covers, but could add slightly more about result shape.

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 concise and front-loaded with the core action in the first sentence, followed by a tight parameter-by-parameter breakdown. Every line adds necessary information without redundancy or filler.

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?

The tool has an output schema, so return-value explanation is unnecessary. The description covers the search semantics, parameter behaviors, and important edge cases like account omission and per-account limit merging, making it complete for effective invocation.

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?

The schema descriptions are empty (0% coverage), but the description explains every parameter meaningfully: query is free text matched against specific fields, account can be omitted for all accounts, since is an optional ISO date lower bound, and limit is max rows per account when merging. This fully compensates for the schema gaps.

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 uses a specific verb 'Search' with a clear resource 'emails' and explicitly scopes to 'from/subject/body text' with 'newest first' ordering. This distinguishes it from sibling tools like list_emails or get_email, which imply different operations.

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 guidance: query semantics, account omission to search all accounts, optional since lower bound, and limit behavior. It does not explicitly name sibling tools as alternatives, but the context and phrasing clearly imply when to search versus list or fetch.

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/LeeFlannery/imap-mcp'

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