Skip to main content
Glama

mail_find

Find exact email messages in Apple Mail's local database by sender, recipient, subject, or Message-ID and return matching copies as JSON. Excludes Trash by default.

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, to, received, mailbox, account_id. Needs at least one of subject_prefix, subject_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.

Input Schema

TableJSON 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)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.8

TDQS

A4.3/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 so well: it discloses that it never waits on indexing, that results are one row per copy with a named field list, and that Trash is excluded unless include_trash or mailboxes asks for it. It stops short of permission/safety context, but for a read tool that is a minor gap.

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-loads the scope distinction, then packs return shape, constraints, defaults, and workflow into a few dense sentences with no filler. Slightly bracket-heavy, but every clause earns its place.

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?

For a 13-parameter read tool with no output schema and no annotations, the description supplies the return format, default exclusions, and the minimum-filter requirement, which is most of what an agent needs. It omits any mention of pagination/truncation defaults beyond what the schema covers, keeping it just short of full.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds a cross-parameter constraint the schema cannot express ('needs at least one of ...') and explains the dedup semantics of message_ids ('finds every copy'). That pushes it above the schema-only baseline.

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 precise verb+resource (exact email lookup) and immediately differentiates itself from the semantic-index sibling by scope ('Mail's own database ... not the semantic index'). An agent can tell this apart from mail_search without opening either 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?

Gives explicit preconditions ('Needs at least one of subject_prefix, subject_contains, from, to, message_ids') and a follow-up workflow ('Pair with mail_trash message_ids to clear what it finds'). It implies the semantic alternative but never names mail_search directly, so routing is left slightly to inference.

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