Skip to main content
Glama
chandshy
by chandshy

Search Emails

search_emails
Read-only

Search emails across folders by sender, recipient, subject, body, date, size, read status, or attachment presence. Returns summaries; use get_email_by_id for full content.

Instructions

Search the live mailbox by sender, recipient (To/CC/BCC), subject, body content, date range (received or sent), size, read/replied/starred/draft status, or attachment presence. Uses server-side IMAP SEARCH except hasAttachment, which filters locally. Use fts_search only for faster local ranked search after its index is built. Use folder for one folder or folders for many (pass ["*"] for all); returns summaries, so use get_email_by_id for full content.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
emailsYes
folderYes
Behavior5/5

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

Discloses server-side IMAP SEARCH, local filtering for hasAttachment, folder cap of 20, and returns summaries. No contradiction with readOnlyHint and openWorldHint annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Fully informative and well-structured, but slightly long; still every sentence adds value, earning a high score.

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?

Given high schema coverage, output schema existence, and detailed description, the tool is fully specified for correct selection and 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?

Adds context beyond the high-coverage schema: explains search mechanism, folder behavior, and local filter for hasAttachment, making parameter usage clear.

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 the live mailbox' and enumerates many searchable fields, distinguishing it from sibling tools like fts_search and get_email_by_id.

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?

Explicitly tells when to use fts_search (faster local ranked search) and get_email_by_id (full content), and explains folder vs folders usage.

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