Skip to main content
Glama
chandshy
by chandshy

Search Emails

search_emails
Read-only

Search emails by sender, recipient, subject, body, date, size, status, or attachment across one or multiple folders.

Instructions

Search emails by sender, recipient (To/CC/BCC), subject, body content, date range (received or sent), size, read/replied/starred/draft status, or attachment presence. Searches are server-side IMAP SEARCH except hasAttachment which filters locally. Use folder for a single folder or folders for multiple (pass ["*"] to search all). Returns summary fields. Use get_email_by_id for full content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoSingle folder to search (ignored if `folders` is set)INBOX
foldersNoSearch multiple folders. Use ["*"] to search all folders (capped at 20). Overrides `folder`.
fromNoFilter by sender address or name
toNoFilter by recipient address
subjectNoFilter by subject text
hasAttachmentNo
isReadNo
isStarredNo
dateFromNoISO 8601 start date (INTERNALDATE — when received by server)
dateToNoISO 8601 end date (INTERNALDATE — when received by server)
limitNoMax results (1-200, default 50)
bodyNoSearch within email body content
textNoSearch headers and body (full text)
bccNoFilter by BCC recipient
answeredNoFilter by whether email has been replied to
isDraftNoFilter by draft status
largerNoMinimum email size in bytes
smallerNoMaximum email size in bytes
sentBeforeNoFilter by Date: header before this date (ISO 8601)
sentSinceNoFilter by Date: header since this date (ISO 8601)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailsYes
countYes
folderYes
Behavior4/5

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

Discloses that searches are server-side IMAP SEARCH except hasAttachment (local filtering) and that folders are capped at 20. Adds value beyond annotations without contradicting them.

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?

Two sentences: first defines capabilities, second provides usage and alternative. No fluff, front-loaded with key info.

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?

Covers main search mechanism, folder handling, and points to alternative for full content. Output schema exists, so return explanation not needed. Adequate for a complex tool.

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?

Adds context for hasAttachment and folder/folders interaction beyond schema. With 85% schema coverage, the description provides useful additional meaning.

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 'Search emails by sender, recipient...' and lists many criteria. It distinguishes from sibling tools like get_emails and get_email_by_id by specifying the scope and output.

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?

Provides guidance on using folder vs folders, notes that hasAttachment is local, and directs to get_email_by_id for full content. Could be more explicit about when not to use, but alternatives are clear.

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/chandshy/mailpouch'

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