Skip to main content
Glama

Mail Search

mail_search

Search an entire Apple Mail mailbox with full-text queries and BM25 relevance ranking, filtering by subject, sender, body, attachments, account, or date range.

Instructions

FTS5 full-mailbox search with BM25 ranking. Index required for body scope.

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

Input Schema

NameRequiredDescriptionDefault
afterNo
limitNo
queryYes
scopeNoall
beforeNo
accountNo
mailboxNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose two meaningful traits: results are BM25 relevance-ranked, and body scope has a hard dependency on an index. It omits permissions, pagination/limit behavior, default account/mailbox scoping, and what a result record contains.

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 sentences, both front-loaded with the operative information (search mechanics first, precondition second). Zero filler and nothing that could be cut without losing meaning.

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

Completeness2/5

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

For a 7-parameter, no-annotation, no-output-schema tool, two sentences leave too much unspecified: no return-shape hint, no pagination or limit semantics, no account/mailbox default behavior. The index dependency is a good start but does not cover the surface area.

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 0% across 7 parameters, so more was needed, but the description does explain the one non-obvious enum value (body requires an index) and implies that scope=all spans the whole mailbox. Date formats for after/before, the meaning of limit, and account/mailbox scoping semantics remain undefined in both schema and description.

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 — 'FTS5 full-mailbox search' — plus the ranking mechanism (BM25), so the agent knows this is a relevance-ranked full-text search rather than a plain listing. It does not explicitly contrast with sibling listing tools like mail_get_emails, which keeps it from a 5.

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

Usage Guidelines3/5

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

The clause 'Index required for body scope' is a real conditional hint that steers the agent away from scope=body when no index exists, and 'full-mailbox' implies cross-folder reach. However, there is no explicit when-to-use versus when-not guidance, and no reference to mail_index_rebuild as the remedy when the index is missing.

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