Skip to main content
Glama
yu2001-s
by yu2001-s

create-smart-mailbox

Create a criteria-based smart mailbox in Apple Mail to filter emails by sender, subject, or body content.

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.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
nameNo
alreadyExistedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Since no annotations are provided, the description fully discloses behavioral traits: it edits the plist file directly, backs it up, writes atomically, does not overwrite existing mailboxes, and warns that Mail should be quit first. This covers important safety and operational details.

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?

The description is well-structured with clear sections (Use when, Returns, Do not use, Safety). Every sentence provides essential information without redundancy.

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?

Covers purpose, usage, behavioral details, safety, and prerequisite actions. Given the tool's complexity (editing plist, potential conflicts with running Mail), the description ensures the agent is fully informed.

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 75%, and the existing schema descriptions already explain parameter semantics (e.g., 'Match body (contains)'). The description does not add significant new meaning beyond stating that the smart mailbox matches based on these substrings.

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 description clearly states the action ('create'), resource ('smart mailbox'), and its nature ('criteria-based virtual view'). It explicitly differentiates from creating a real folder by naming the alternative tool 'create-mailbox'.

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?

Provides explicit 'Use when:' and 'Do not use when:' guidance, including the name of the alternative tool. Also gives safety context about quitting Mail for reliable results.

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