Skip to main content
Glama
LeChabrax

Apple Mail MCP Server

by LeChabrax

update_rule

DestructiveIdempotent

Edit an Apple Mail rule's settings: name, conditions, actions, or enabled state. Only fields you specify are changed; you'll be prompted for risky modifications.

Instructions

Update an existing Mail.app rule (patch semantics).

Patch semantics: only fields you provide are changed. conditions and actions, when provided, REPLACE their respective structures wholesale (not merged).

Conditional confirmation: prompts the user via MCP elicitation when the patch touches conditions or match_logic (which alter matching scope), or replaces actions with a set that includes a dangerous action (move / forward / delete / copy). An actions patch limited to organizational flags (mark_read / mark_flagged / flag_color) skips the prompt, as do patches limited to enabled and/or name (trivially reversible). The enable/disable path replaces the removed set_rule_enabled tool: call update_rule(rule_index, enabled=True|False).

Refuses to update any rule whose existing actions include something outside the supported schema (run-AppleScript, redirect, reply text, play sound, custom highlight color); raises MailUnsupportedRuleActionError. Edit such rules in Mail.app's UI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoNew name (only set if not None).
actionsNoIf provided, REPLACES all action flags wholesale.
enabledNoNew enabled state (only set if not None).
conditionsNoIf provided, REPLACES all existing conditions.
rule_indexYes1-based positional index from list_rules.
match_logicNo'all' or 'any', only set if not None.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already flag this as destructive and idempotent, but the description goes far beyond: it spells out replacement-not-merge semantics for conditions/actions, the conditional confirmation trigger (touching conditions/actions or moving/forwarding/deleting), which paths skip confirmation (flags, name/enabled), and the refusal behavior for unsupported actions. This is exactly the behavioral detail an agent needs before calling a destructive mutation, and it exceeds what the annotations convey.

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 long but every sentence earns its place — patch semantics, confirmation triggers, refusal conditions, and the migration note all carry unique information. The section markers ('Patch semantics:', 'Conditional confirmation:') aid parsing, though a stricter use of line breaks or bullets would improve scanability. It's dense but not padded.

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?

The description fully covers mutation semantics (patch vs replace), conditions for user confirmation, refusal cases, the replacement of the removed enable/disable tool, and correct usage of rule_index. With an output schema presumably present)Skip nothing needed about return values. Given the complexity of a patch tool with safety gates Submission rules, this is complete enough that I can't identify a behavior the agent would have to guess.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is essentially 100% (every param has a description), but the description adds the decisive semantics: `conditions`/`actions` REPLACE wholesale rather than merge, `rule_index` is 1-based from a specific prior call (list_rules), and the `enabled` path replaces a removed tool call. These semantics are not inferable from the schema field names alone and are exactly what prevents a wrong call.

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?

Lead sentence states the verb (update), object (rule), and the patch model immediately: 'Update an existing Mail.app rule (patch semantics)'. The first paragraph unambiguously defines what is changed and how, and the closing sentence adds the boundary case (refusal for unsupported actions). No ambiguity about what the tool does.

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?

Exceptional. It specifies when confirmation is prompted (matching-scope fields and dangerous actions), when it is skipped (organizational flags, enabled/name), and explicitly tells the agent that the enable/disable path replaces the removed `set_rule_enabled` tool with a concrete call pattern: `update_rule(rule_index, enabled=True|False)`. It also states the refusal condition and the fallback action (edit in UI). An agent has everything needed to decide when to call it safely.

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