Skip to main content
Glama

mail_search

Read-onlyIdempotent

Search recent macOS Mail inbox messages by subject substring to locate matching emails.

Instructions

Search subject substring in inbox messages via Mail scripting. Reads at most the most recent 500 inbox messages. [v1.0.0; permissions: automation:Mail]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYesSubject query

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
toolYestool name
errorYes
statusYes
versionYessemantic version

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already establish the safe read-only/idempotent profile, and the description adds genuinely new behavior: it bounds reads to the most recent 500 inbox messages and discloses the required automation:Mail permission. These are constraints an agent cannot derive from the annotations or schema.

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?

Two tightly packed sentences plus a standard version/permission tag; the scope and the 500-message cap are front-loaded. Nothing is wasted, though the metadata bracket is boilerplate rather than substance.

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 values need not be described. For a two-parameter search tool the description covers scope, matching semantics, read bounds, and permissions; only the limit parameter's meaning is left unexplained.

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 coverage is only 50% – the 'limit' parameter has an empty description while 'query' is covered. The description clarifies that matching is a subject substring, which adds real meaning for the query, but it never explains the limit parameter or notes that it is capped at 100 while 500 messages are scanned.

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 ('Search'), resource ('inbox messages'), and matching scope ('subject substring'), which already sets it apart from mail_read. It does not explicitly name siblings, but the inbox/subject-substring scoping is concrete enough that an agent can identify it.

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?

No when-to-use or when-not-to-use guidance, and no mention of alternatives like mail_read for opening a specific message. The scope constraints imply a scenario but the agent must infer routing itself.

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