Skip to main content
Glama
marius-cetanas

macos-mail-mcp

search_messages

Search emails by subject, sender, or message content, then narrow results using date, mailbox, and account filters for faster retrieval.

Instructions

Search messages by subject, sender, or content. Prefer 'subject' or 'sender' fields which are fast metadata lookups. The 'content' field searches message bodies and is significantly slower and less reliable — it may trigger full message downloads on IMAP accounts and can time out. WARNING: Mail.app loads all matching messages into memory before applying the limit, so searches on large mailboxes can be very slow. Always narrow results with mailboxName and accountName when possible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoOnly return messages received after this ISO 8601 date (e.g. 2024-01-15T00:00:00Z)
fieldYesThe field to search in
limitNoMaximum number of results to return (default 50)
queryNoThe search query string (optional when using date filters)
beforeNoOnly return messages received before this ISO 8601 date (e.g. 2024-12-31T23:59:59Z)
accountNameNoLimit search to a specific account (omit to search all accounts)
mailboxNameNoLimit search to a specific mailbox (omit to search all mailboxes)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed2 schema fields changedv1.3.2
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / limit / maximum
      Added value: +9007199254740991
  2. First observedv1.2.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it delivers: it warns about IMAP full message downloads, timeouts, and that Mail.app loads all matching messages into memory before applying the limit. These are exactly the non-obvious, failure-prone behaviors an agent needs to know before calling the tool.

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?

Three dense sentences, front-loaded with purpose before caveats, and every clause earns its place — no filler, no repetition of schema properties, and the warnings are stated in operational terms agents can act on.

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 7-parameter tool with no output schema and no annotations, the description covers the critical surfaces: performance risks, timeout conditions, and mitigation strategies. Its only gap is that it never hints at the return shape (for example, what fields the returned messages include or their ordering), which is more apparent because no output schema exists.

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 real parameter-level meaning beyond the schema: it explains the tradeoff between the field values (fast metadata lookup vs slow, unreliable body search) and how mailboxName/accountName mitigate timeout risk. This turns the enum into a decision rather than just a list of choices.

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?

The opening clause 'Search messages by subject, sender, or content' states a specific verb, resource, and the exact fields the tool supports, leaving no ambiguity about what it does. This scope also naturally differentiates it from read-only siblings like list_messages and get_message without needing to name them.

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?

The description gives explicit operational guidance: prefer 'subject' or 'sender' fields because they are fast metadata lookups, avoid 'content' when possible because it is slow and can time out, and always narrow with mailboxName/accountName. It does not name an alternative sibling tool for when a plain listing would be a better fit, so the exclusion guidance is incomplete.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marius-cetanas/macos-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server