Skip to main content
Glama

Search mail

mail_search
Read-only

Search iCloud Mail messages newest first and filter by sender, recipient, subject, body text, date, mailbox, unread, or flagged status to find specific emails.

Instructions

Searches messages, newest first. Subjects are as the sender wrote them.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mail_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoTo header contains this text.
fromNoFrom header contains this text.
roleNoWell-known role: inbox, sent, drafts, trash, junk, archive, notes.
textNoBody or subject contains this text.
limitNoPage size. Omitted means 25. More than 100 is rejected.
sinceNoMessages on or after this date.
beforeNoMessages before this date.
cursorNoCursor from the previous page.
unreadNoWhen set, only unseen messages.
flaggedNoWhen set, only flagged messages.
mailboxNoMailbox path. Omit to use `role` or the inbox.
subjectNoSubject contains this text.

Output Schema

NameRequiredDescriptionDefault
messagesYes
warningsYes
next_cursorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, and destructiveHint=false, so the safety profile is covered. The description adds useful behavioral detail — result ordering (newest first) and that subject matching is against raw sender-authored text — but says nothing about pagination behavior or the cursor-based paging model.

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?

Two short sentences with no filler, and the ordering constraint is front-loaded. The subject-authenticity note is a compact caveat that earns its place by clarifying match semantics.

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?

Output schema exists, so return values need not be explained, and annotations plus full schema coverage carry much of the burden. However, for a twelve-parameter paginated search tool, the description is thin on how paging, dates, and filters combine, leaving meaningful inference to the agent.

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

Parameters3/5

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

Schema description coverage is 100%, so all twelve parameters are already documented in the schema and the baseline is 3. The description adds only the newest-first ordering and raw-subject caveat; it does not explain limit bounds, cursor semantics, or date-format expectations beyond what the schema states.

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?

States a specific verb and resource ("Searches messages") plus ordering ("newest first"), which is more than a restatement of the name. It does not differentiate from siblings like mail_get_message or mail_list_mailboxes, so an agent must infer that this is the multi-result query tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no explicit when-to-use guidance, no conditions for choosing this over mail_get_message, and no exclusions. Usage is only implied by the verb "searches," leaving the agent to infer the boundary between search and single-message retrieval.

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