Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by TrevorIkky

search_messages

Locate Apple Mail messages in an account by sender or subject with a case-insensitive query; optionally scan bodies for excerpts.

Instructions

Find messages whose sender or subject contains query, case-insensitively.

search_body: true also searches bodies and returns an excerpt, which is much slower - keep scan small. For real search on a large mailbox, use imap_search.

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>",
      "query": "<query>"
    },
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
scanNo
limitNo
queryYes
accountYes
mailboxNoINBOX
max_charsNo
search_bodyNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full load, and it does disclose case-insensitivity, that body search returns an excerpt, and that body search is much slower. It does not state that the call is read-only, how `limit` truncates results, or what permissions the account needs.

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?

Three short sentences with no filler, front-loading the core matching semantics before the performance caveat and the sibling pointer. Every sentence adds distinct information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 values need not be explained. However, for a 7-parameter tool with 0% schema coverage, leaving half the parameters (account, mailbox, limit, max_chars) undefined makes the definition only partially complete.

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, and the description only explains `query` (substring, case-insensitive, sender/subject), `search_body`, and obliquely `scan`. Account, mailbox, limit, and max_chars remain completely undocumented, which is a significant gap given zero schema help.

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?

States a specific verb ('Find') and resource ('messages') with explicit matching scope: sender or subject, case-insensitively. It also distinguishes itself from the sibling `imap_search`, so an agent can differentiate without opening the schema.

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?

Explicitly routes the agent to `imap_search` for real search on a large mailbox, and warns to keep `scan` small when `search_body` is enabled. It gives no guidance on when to prefer `list_messages` or `read_by_position`, but the primary alternative is named with a condition.

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