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
Behavior5/5

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

Despite no annotations, the description thoroughly covers behavioral traits: it edits SyncedSmartMailboxes.plist directly with backup and atomic write, never rewrites existing smart mailboxes, and warns that Mail should be quit first for reliability. This exceeds typical transparency expectations.

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?

The description is well-structured with clear headings ('Use when:', 'Returns:', 'Do not use when:', 'Safety:') and front-loads the purpose. Every sentence adds value, though it could be slightly more concise. Overall, it is effective and not verbose.

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?

Given the tool's complexity (plist editing, multiple criteria, output confirmation) and the presence of an output schema, the description covers essential aspects: usage context, return values, safety precautions, and prerequisites (quit Mail). It does not detail the return schema structure, but that is handled by the output schema. The explanation is sufficient for an AI agent to invoke the tool correctly.

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?

The schema already describes the optional parameters (bodyContains, fromContains, subjectContains) as substring matches. The description reinforces this by mentioning 'matches a sender, subject, or body substring'. It does not add syntax or format details beyond the schema, but the 75% schema coverage means the description is not burdened heavily. There is slight room to explain how multiple criteria combine (AND/OR), but it is not necessary for basic usage.

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 tool creates an Apple Mail smart mailbox, a criteria-based virtual view matching sender, subject, or body substring. It distinguishes from creating a real folder by explicitly mentioning the sibling tool 'create-mailbox' in the usage guidance, making the purpose unambiguous.

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?

The description provides explicit 'Use when' and 'Do not use when' instructions, including the alternative 'create-mailbox' for real folders. It also notes the specific German-localized macOS use case where AppleScript fails, offering clear context for when this tool is preferred.

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

Install Server

Other Tools

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/yu2001-s/apple-mail'

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