Skip to main content
Glama
FaisalFehad

IMAP Mail MCP

by FaisalFehad

mail_query_by_folder

Search emails in a specified folder with free-text queries. Supports filtering by subject, body, from, to, and returns results sorted by date.

Instructions

Convenience free-text query in one folder. Prefer mail_search_advanced for canonical searches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort by UID (default: desc/newest-first)desc
limitNoMax results (default 50, capped globally)
queryYesFree-text query to match
cursorNoOpaque pagination cursor from previous response
fieldsNoFields to search. Defaults to subject, body, from, to.
mailboxYesFolder name, e.g. INBOX
returnPageNoReturn {items,nextCursor} instead of raw array
includeSnippetNoInclude short plain-text snippet per message
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It fails to mention whether the tool is read-only, has side effects, requires authentication, or has rate limits. This lack of transparency could lead to misuse.

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 consists of two short, focused sentences. The first defines the tool's purpose, and the second provides guidance. No unnecessary words or information.

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?

The tool has 8 parameters and no output schema. The description is very brief and does not cover return values, pagination (cursor, returnPage), or snippet inclusion. However, the schema provides full parameter details, so the description is adequate for basic understanding but not complete for complex use cases.

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?

The schema covers all parameters with descriptions, so the baseline is 3. The description adds minimal value beyond the schema, just noting it is a free-text query. It does not explain parameter interactions or nuances.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it is a convenience free-text query within one folder. It distinguishes itself from mail_search_advanced by noting the latter is preferred for canonical searches, though it could better differentiate from other sibling tools like mail_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description tells the agent to prefer mail_search_advanced for canonical searches, providing some guidance on when to use this tool versus alternatives. However, it does not specify what constitutes a 'canonical' search or when not to use this tool, leaving room for interpretation.

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

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