Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

create-smart-mailbox

Create a criteria-based Apple Mail smart mailbox that filters messages by sender, subject, or body text. Works on German-localized macOS where AppleScript smart-mailbox terms fail.

Instructions

Use when: creating an Apple Mail smart mailbox (a criteria-based virtual view) that matches a sender, subject, or body substring — works on German-localized macOS where AppleScript's smart-mailbox terms fail. Returns: confirmation of creation, or a note that a smart mailbox with that name already existed. Do not use when: creating a real folder (use create-mailbox). Safety: edits Apple Mail's SyncedSmartMailboxes.plist directly. It backs the file up (.bak) and writes atomically, and never rewrites your existing smart mailboxes. It does not quit Mail — quit Mail first for reliable results, since a running Mail may not show the new smart mailbox until relaunched and can overwrite plist edits it did not make.

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": {
      "name": "<name>"
    },
    "name": "create-smart-mailbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
bodyContainsNoMatch body (contains)
fromContainsNoMatch sender (From contains)
subjectContainsNoMatch subject (contains)

Output Schema

NameRequiredDescriptionDefault
okNo
nameNo
alreadyExistedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.10.24
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv2.10.8
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
  3. Addedv2.9.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: it reports which file is edited (SyncedSmartMailboxes.plist), that a .bak backup is made, that writes are atomic, that existing smart mailboxes are never rewritten, and that it does not quit Mail. It also warns of a real hazard (a running Mail may overwrite plist edits and not show the new mailbox until relaunch) with a recommended precondition.

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 'Use when / Returns / Do not use when / Safety' structure makes it scannable, and there is no filler. The safety block is dense with multi-clause sentences, slightly heavier than needed, but every clause carries operational value.

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 mutation tool touching an app's config file, the description covers what an agent needs: when to prefer it, the exclusive alternative, the prerequisite of quitting Mail, duplicate-name behavior, and the safety envelope. An output schema exists, so omitting return structure detail is appropriate.

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 75% and the schema already documents fromContains/subjectContains/bodyContains; the description adds that matching is substring-based on sender/subject/body, which reinforces the '(contains)' semantics. It does not discuss how multiple criteria combine (AND vs OR) or the name-collision requirement, so it adds real but not complete meaning.

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 ('creating an Apple Mail smart mailbox (a criteria-based virtual view)') plus the matching dimensions (sender, subject, body substring) and the German-localized macOS rationale that motivates it. Explicitly contrasts with create-mailbox, so it is distinguishable from the nearest sibling without opening schemas.

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

Usage Guidelines5/5

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

Has an explicit 'Use when' and an explicit 'Do not use when: creating a real folder (use create-mailbox)', naming the alternative and the condition that selects it. Also scopes usage to German-localized systems where AppleScript smart-mailbox terms fail, which is a non-obvious selection criterion.

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