Skip to main content
Glama
isityael

Apple Mail MCP Server

by isityael

search_emails_advanced

Search all email accounts and mailboxes using filters for subject, sender, date, read status, attachments, and more. IMAP-enabled for fast results.

Instructions

Powerful unified search across accounts and mailboxes with flexible filters.

Combines the capabilities of search_emails, search_by_sender, search_email_content, and search_all_accounts into one tool. When account is None, all accounts are searched.

Uses IMAP when available (much faster, no Mail.app freezes). Falls back to AppleScript for accounts without IMAP configuration.

Args: account: Account to search (None = all accounts) mailbox: Mailbox name (default "INBOX", "All" for all mailboxes) subject_contains: Filter by subject keyword (case-insensitive) body_contains: Filter by body text (slower, case-insensitive) sender_contains: Filter by sender name/email (case-insensitive) to_contains: Filter by To recipient address (case-insensitive, IMAP-accelerated) cc_contains: Filter by CC recipient address (case-insensitive, IMAP-accelerated) date_from: Start date "YYYY-MM-DD" (inclusive) date_to: End date "YYYY-MM-DD" (inclusive) is_read: Filter by read status (True/False/None for any) has_attachments: Filter by attachment presence (True/False/None) is_flagged: Filter by flagged status (True/False/None) max_results: Maximum results (default 50) offset: Skip first N results for pagination (default 0) output_format: "text" (human-readable) or "json" (structured)

Returns: Matching emails across the specified scope

User Preferences: {"workflow": "default", "notifications": "enabled"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetNo
accountNo
date_toNo
is_readNo
mailboxNoINBOX
date_fromNo
is_flaggedNo
cc_containsNo
max_resultsNo
to_containsNo
body_containsNo
output_formatNotext
has_attachmentsNo
sender_containsNo
subject_containsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses important behaviors: IMAP vs AppleScript fallback, slower body search, and that account=None searches all accounts. It lacks details on pagination limits or rate limits, but covers key behavioral traits.

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?

The description is well-structured with a summary, functional overview, and bulleted parameter list. It is slightly verbose but appropriate for the number of parameters. Every sentence adds value.

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?

Given the complexity (15 params, no output schema needed due to presence of output schema), the description is fairly complete: it covers purpose, parameters, behavior, and format options. It could elaborate on pagination semantics but is generally sufficient.

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 description provides a comprehensive parameter list with detailed explanations for all 15 parameters, including defaults, formats, and special values like 'All' for mailbox. Since schema coverage is 0%, this adds essential meaning beyond the raw schema.

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 it as a 'Powerful unified search across accounts and mailboxes with flexible filters' and explicitly mentions combining capabilities of specific sibling tools (search_emails, search_by_sender, search_email_content, search_all_accounts). This distinguishes it from those similar tools.

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 explains when to use this tool (for flexible filters and cross-account search) and includes a critical note about IMAP vs AppleScript fallback. However, it does not explicitly state when NOT to use this tool or provide direct comparisons to alternatives for simple searches.

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/isityael/apple-mail-mcp'

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