Skip to main content
Glama
s-morgan-jeffries

apple-mail-mcp

create_rule

Create a Mail.app rule to automatically organize, flag, or forward incoming emails based on sender, subject, or other criteria. Set conditions and actions like move to folder, mark read, delete, or forward.

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

Behavior5/5

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

Annotations provide no safety hints (readOnlyHint=false, destructiveHint=false). The description compensates fully by disclosing that certain actions trigger user confirmation, that organizational-only rules are created without a prompt, and that rules are appended to the end with the returned rule_index indicating the new total count. This adds substantial behavioral context beyond the annotations.

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 five sentences long with no wasted words. It is front-loaded with the main purpose and organized logically: purpose, action-dependent confirmation, appending behavior, and return value. Every sentence earns its place.

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 (5 parameters, nested objects, output schema, and behavioral nuances), the description covers the essential points: creation behavior, confirmation triggers, and return value meaning. It could mention error conditions or required account permissions, but overall it is fairly complete.

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 value by explaining the behavioral implications of the `actions` parameter (confirmation required for move/forward/delete) and the meaning of the return value (`rule_index`), which goes beyond the schema's static descriptions.

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 starts with 'Create a new Mail.app rule,' clearly stating the action and resource. It distinguishes from siblings like update_rule and delete_rule by detailing creation-specific behaviors (confirmation, appending to end), making the tool's unique purpose explicit.

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?

The description provides explicit guidance on when to use the tool by separating rules with destructive actions (move/forward/delete) requiring confirmation from organizational-only ones that are created without a prompt. Although it does not explicitly mention alternative tools, it gives sufficient context for appropriate usage.

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/s-morgan-jeffries/apple-mail-fast-mcp'

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