Skip to main content
Glama
LeChabrax

Apple Mail MCP Server

by LeChabrax

create_rule

Create an automated Mail rule that filters incoming email and performs actions like moving, copying, forwarding, deleting, or flagging based on your conditions.

Instructions

Create a new Mail.app rule.

Rules with actions that can move, forward, or delete mail (delete / forward_to / move_to / copy_to) require user confirmation — a single create can install automation that auto-forwards or deletes all future mail (#222). Organizational-only rules (mark_read, mark_flagged, flag_color) are created without a prompt. Mail.app appends new rules to the end of the rule list, so the returned rule_index equals the new total rule count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRule display name. Need not be unique.
actionsYesDict with at least one truthy entry from: - move_to: {"account": str, "mailbox": str} - copy_to: {"account": str, "mailbox": str} - mark_read: bool - mark_flagged: bool (with optional flag_color enum) - flag_color: 'none' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'gray' - delete: bool - forward_to: list[str] of email addresses
enabledNoWhether the rule is enabled on creation. Default True.
conditionsYesList of condition dicts (at least one required). Each: - field: 'from' | 'to' | 'subject' | 'body' | 'any_recipient' | 'header_name' - operator: 'contains' | 'does_not_contain' | 'begins_with' | 'ends_with' | 'equals' - value: substring or value to match - header_name: required iff field == 'header_name'
match_logicNo'all' (AND across conditions) or 'any' (OR). Default 'all'.all

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations are thin (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the description carries the full load — and it delivers. It flags the counterintuitive fact that a single create can install automation with auto-forward/delete consequences, requires user confirmation for safe execution, and explains why the returned rule_index reflects the new total count. This is exactly the kind of non-obvious runtime behavior agents can't infer. A small deduction for not mentioning what happens if the user declines the confirmation dialog.

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?

Beautifully structured: one line for purpose, two short paragraphs covering warning-worthy behavior and return semantics. The critical gotchas (confirmation prompt, append-to-end behavior) are front and center. A single point off for the cryptic '#222' reference — a dangling artifact that doesn't help an agent executing a task and pollutes the otherwise clean description.

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 tool with 5 params, nested objects, and an output schema, this definition is quite complete. The combination of annotations (safety/destructive profile), a rich 100% schema (parameter semantics), and a description that explains the non-obvious behavioral boundaries (confirmation requirement, rule ordering, return value) covers the major risks. What's missing: behavior on confirmation denial, and interaction with the 'enabled' flag. Given the safety-critical nature of the described operations, those two details would make it fully airtight.

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 description coverage is 100%; every parameter is documented with examples, defaults, and structure. The description stays at the semantic layer — it doesn't try to re-document the schema, which is the right call. The action-type distinction (delete/forward_to/move_to/copy_to) ties the description to the schema's 'actions' param in a way that clarifies selection without duplicating it, but it's marginal value added beyond what the schema already provides.

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?

Opens with a crisp 'Create a new Mail.app rule.' — a specific verb, a concrete domain resource, and a clear scope. Sibling tools (list_rules, update_rule, delete_rule) make the creation intent unambiguous; no reasonable agent could confuse this with an operation on an existing rule.

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 a crisp decision boundary for when the tool is behaviorally different: actions that 'move, forward, or delete mail' trigger a user confirmation prompt, while 'organizational-only' actions do not. This is excellent operational context an agent needs before crafting a risky rule. It doesn't explicitly name alternatives ('use update_rule to modify an existing rule'), but it's clear enough given the parameter docs cover the action vocabulary.

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

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