Skip to main content
Glama
Apple Mail MCP

Apple Mail MCP

by cyberprive

search_messages

Read-only

Search Apple Mail messages by account, mailbox, date range, unread status, and subject, sender, or body text; returns lightweight summaries for quick triage.

Instructions

Search messages in a mailbox. Returns lightweight summaries.

Args: account: Account name (from list_accounts). mailbox: Mailbox name (from list_mailboxes). When omitted (or set to "@inbox"), the server auto-detects the account's inbox by trying the common localizations (INBOX, Bandeja de entrada, Posteingang, Boîte de réception, Caixa de entrada, etc.). since: ISO 8601 timestamp; only messages received at or after are returned. Defaults to 7 days ago if not provided — without a date floor, the script must materialize the entire mailbox, which is ruinous on large iCloud inboxes. Pass an explicit older date if you need to look further back. before: ISO 8601 timestamp; only messages received strictly before are returned. limit: Max results, capped at 500. Default 50. unread_only: If true, only return unread messages. query: Case-insensitive substring filter. Scope set by field. field: Where query is matched. One of: "subject" — subject line only "sender" — sender name + address "content" — full body text (slower; iterates message content) "all" — subject + sender (default; content excluded for perf)

Returns a list of {id, message_id, account, mailbox, subject, sender, date_received, read, snippet}. Use id with get_thread to fetch the full body.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "account": "<account>"
    },
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldNoall
limitNo
queryNo
sinceNo
beforeNo
accountYes
mailboxNo
unread_onlyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint, and the description adds substantial behavior on top: the 7-day default since with a concrete performance rationale ('ruinous on large iCloud inboxes'), the 500 cap on limit, the fact that 'content' field iterates bodies and is slower, and that 'all' excludes content for performance. That is real operational context an agent needs.

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?

Purpose and return shape are front-loaded, then grouped Args and a Returns line. Most sentences earn their place, though the long enumeration of inbox localizations is slightly verbose; still readable and well organized.

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?

With 8 params, no output schema, and zero schema descriptions, the definition supplies parameter meaning, return fields, and performance caveats. Minor gaps remain around pagination/ordering and the exact format of snippet, but nothing that would cause a failed call.

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?

Schema coverage is 0%, so the description must carry all meaning and it does: it defines every parameter, supplies the field enum values absent from the schema, explains query scope via field, documents mailbox auto-detection with localization examples, and gives defaults for since/limit.

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?

Opens with a specific verb+resource ('Search messages in a mailbox') and immediately states the return shape ('lightweight summaries'), which separates it from the heavier get_thread sibling that the description explicitly names later.

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?

Gives clear usage context: mailbox may be omitted and auto-detected, and the final sentence routes the agent to get_thread when full bodies are needed. It stops short of explicit exclusions (e.g. when to prefer get_thread or how to paginate), so not a full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.