Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by TrevorIkky

imap_search

Search large Apple Mail IMAP mailboxes by sender, subject, text, or since date; returns headers and UIDs for imap_fetch while keeping messages unread.

Instructions

Server-side search - fast even on mailboxes too large for AppleScript.

since takes the IMAP date form, e.g. "01-Oct-2026". Returns headers plus the UIDs to pass to imap_fetch. Read-only: nothing is marked read.

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": "imap_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
sinceNo
accountYes
mailboxNoINBOX
from_containsNo
text_containsNo
subject_containsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does meaningful work: it declares the read-only contract explicitly ('nothing is marked read'), discloses what is returned ('headers plus the UIDs'), and flags the performance characteristic relative to an alternative implementation. What is missing is behavior around the `limit` parameter (truncation vs pagination) and any error or empty-result semantics.

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?

Four short clauses, front-loaded with the core purpose and scale rationale, followed by the one format detail an agent cannot guess and the return/chaining note. Every sentence earns its place and nothing is padded.

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?

An output schema exists, so return structure need not be spelled out, yet the description helpfully summarizes it anyway. Read-only safety, the tricky date format, and the follow-up tool are all covered. The remaining shortfall is filter-combination semantics and how `limit` interacts with the result set, which for a 7-parameter search tool would be worth one more sentence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 7 parameters, yet the description explains only one of them — the non-obvious IMAP date syntax for `since`. The remaining six (`limit`, `account`, `mailbox`, `from_contains`, `text_contains`, `subject_contains`) are left to name inference, and it is never stated whether the *_contains filters are substring/case-insensitive matches or whether multiple filters AND together. That is a substantial gap for a tool whose schema documents nothing.

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 states a specific verb and resource ('server-side search' over a mailbox) and pins down the scale advantage ('fast even on mailboxes too large for AppleScript'). It also names the downstream consumer of the results (`imap_fetch`), so the agent understands this is a discovery step. It does not distinguish itself from the sibling search_messages, so it stops short of a 5.

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?

There is an implied workflow instruction — use this to get UIDs, then call `imap_fetch` on them — which is genuinely useful chaining guidance. However, there is no explicit statement of when to prefer this over search_messages or the position-based read tools, and no exclusions or prerequisites (auth, account permissions) are given. Usage is inferred rather than directed.

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