Skip to main content
Glama

mail_find

Search Apple Mail's local database for exact email copies by subject, sender, recipient, Message-ID, or date; returns JSON rows without semantic indexing delays.

Instructions

Exact email lookup in Mail's own database (not the semantic index, so it never waits on indexing and matches filters exactly). Returns JSON: one row per copy (the same Message-ID in INBOX and Sent is two rows) with message_id, subject, from, from_name, to, received, mailbox, account_id. Needs at least one of subject_prefix, subject_contains, from_name_contains, from, to, message_ids. Trash is excluded unless include_trash or mailboxes asks for it. Pair with mail_trash message_ids to clear what it finds, or mail_unjunk to move Junk copies to the Inbox.

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_find"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoExact recipient address (To or Cc)
fromNoExact sender address
limitNoMaximum rows (default 50, max 500); 'truncated' says when more matched
from_meNoOnly messages sent from one of your own addresses (any address that appears as a sender in a Sent mailbox)
to_onlyNoWith to: that address is the only recipient
mailboxesNoOnly these mailbox kinds (default: every mailbox except trash)
message_idsNoRFC822 Message-IDs (finds every copy)
include_trashNoAlso return copies already in Trash (default false)
received_afterNoISO 8601 date/time; only messages received at or after it
subject_prefixNoSubject starts with this text (case-insensitive), e.g. '[Network] '
received_beforeNoISO 8601 date/time; only messages received before it
older_than_hoursNoOnly messages received more than this many hours ago
subject_containsNoSubject contains this text (case-insensitive)
from_name_containsNoSender display name contains this text (case-insensitive; Mail stores the name decoded), e.g. 'via Cloaked'

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.4.1
    • addedInput schema / properties / from_name_contains
      Added value: +{
      +  "description": "Sender display name contains this text (case-insensitive; Mail stores the name decoded), e.g. 'via Cloaked'",
      +  "type": "string"
      +}
  2. First observedv3.0.8

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the data source and its latency characteristic (never waits on indexing), the default trash exclusion, and that results are one row per copy (same Message-ID in INBOX and Sent is two rows). It omits auth requirements and any cost/rate considerations, which keeps it short of a 5.

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?

Front-loaded with the core distinction (exact lookup vs semantic index) and dense with useful detail across three sentences. The third sentence's mail_trash/mail_unjunk pairing is slightly tangential to invoking this tool, but it is short and operationally useful rather than filler.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter read tool with no output schema, the description supplies the calling precondition, the default scope, and the row shape including the multi-copy nuance - everything an agent needs to call it correctly. Remaining details such as limit/truncation are covered by the schema itself.

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 100%, so the baseline would be 3, but the description adds real semantics the schema cannot express: the at-least-one-filter constraint (the schema marks nothing required) and the interaction between the default trash exclusion and mailboxes/include_trash. The return-field list also tells the agent what each row yields.

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 and resource ('Exact email lookup in Mail's own database') and immediately distinguishes itself from the semantic-index alternative, so an agent can tell it apart from mail_search without opening either schema. The parenthetical 'exact' vs 'semantic index' contrast is precisely the kind of differentiation siblings need.

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 when-to-use context (when you need exact matching and cannot wait on indexing) and a hard precondition ('Needs at least one of subject_prefix, subject_contains, from_name_contains, from, to, message_ids'). It also names follow-up tools (mail_trash, mail_unjunk) with their purpose, but never explicitly says 'use mail_search for fuzzy/semantic queries' - the exclusion is only implied by the parenthetical.

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