Skip to main content
Glama
wylieswanson

apple-mail-mcp-server

by wylieswanson

update_rule

DestructiveIdempotent

Modify an existing Mail rule by changing only the fields you specify. Enables or disables rules, renames them, or replaces conditions and actions, with confirmation prompts for risky changes.

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 indicate destructive and idempotent, but description adds conditional confirmation, refusal behavior, and patch semantics. No contradiction.

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?

Long but well-structured; each section adds unique value. Slight redundancy in explaining patch semantics twice, but overall efficient for the complexity.

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?

With output schema present and 6 params, the description covers all behavioral nuances: patching, confirmation, refusal, and deprecation replacement. No gaps identified.

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 100%, but description adds vital context: wholesale replacement of conditions/actions, only-set-if-not-None behavior, and the enable/disable shortcut. This is well beyond the schema.

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 'Update an existing Mail.app rule (patch semantics)' and distinguishes from sibling tools like create_rule and delete_rule with specific verb and resource.

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?

Extensive guidelines: explains patch semantics, when confirmation triggers (conditions/match_logic/dangerous actions), when it skips (flags, name, enabled), and refusal for unsupported actions. Also notes that enable/disable replaces set_rule_enabled.

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

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