Skip to main content
Glama
jayvee6

apple-mail-mcp

by jayvee6

create_rule

Create an Apple Mail rule that automatically files incoming mail from specified sender domains into a chosen folder, with optional sorting of existing messages.

Instructions

Create a native Apple Mail rule that files incoming mail from given sender domains into a folder. This is a REAL Mail rule: Mail applies it to new incoming mail automatically while Mail is running — no background process. Multiple domains are OR-combined into one rule. Native rules do not touch existing mail; set apply_to_existing=true to also sort what is already in the mailbox now. Idempotent: an existing rule with the same name is replaced. The destination folder must already exist (use create_folder).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRule name — also the identity key for replace/delete, e.g. "Newsletters".
accountNoAccount whose folder is the destination. Defaults to "iCloud".iCloud
domainsYesSender domains to match, e.g. ["newsletter.com","shop.de"]. Mail is filed if its sender contains ANY of them.
src_mailboxNoMailbox to sort when apply_to_existing is true. Defaults to "INBOX".INBOX
dest_mailboxYesExisting destination folder in the account, e.g. "Newsletters".
apply_to_existingNoAlso move matching mail already in the source mailbox now (one pass per domain). Default false = future mail only.
Behavior5/5

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

With no annotations, the description carries full burden and delivers rich behavioral disclosure: real Mail rule with no background process, OR-combining, no touching existing mail by default, idempotent replacement, and destination must exist. This exceeds typical descriptions.

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?

Six sentences, each adding unique information, with the main purpose front-loaded. No filler or redundancy; the 'REAL' emphasis and parenthetical usage are purposeful.

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 6-parameter tool with no output schema, the description covers key behaviors, side effects, prerequisites, and defaults, enabling an agent to invoke it correctly without additional assumptions.

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 baseline is 3. The description adds valuable semantics beyond schema: domains are OR-combined, apply_to_existing controls existing mail, and dest_mailbox must be pre-existing. This justifies above baseline.

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?

Description starts with a specific verb and resource: 'Create a native Apple Mail rule that files incoming mail from given sender domains into a folder.' This clearly distinguishes from sibling tools like move_matching or list_rules by emphasizing native automatic rule creation.

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?

Provides clear context for when to use: for automatic future mail, with apply_to_existing for current mail, and prerequisite to create_folder. Does not explicitly name alternatives like move_matching for one-off moves, so it misses some exclusion guidance.

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/jayvee6/apple-mail-mcp'

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