Skip to main content
Glama
TG-Techie

apple-mail-mcp

by TG-Techie

update_rule

Update existing Apple Mail rules with patch semantics—replace conditions or actions wholesale, or toggle enabled state. Prompts for confirmation on irreversible 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 only when the patch touches conditions, actions, or match_logic — those replacements are irrecoverable. Patches limited to enabled and/or name (trivially reversible) skip the prompt. 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?

With no annotations, the description carries the full burden and does so thoroughly. It discloses patch semantics, wholesale replacement of conditions/actions, irrecoverable replacements, the confirmation prompt logic, and the specific error (MailUnsupportedRuleActionError) for unsupported actions. This is exemplary transparency.

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 dense but not bloated; every sentence adds value. It leads with purpose, then patch semantics, then confirmation, then the tool replacement, then error conditions. The length is justified given the complexity, though it could be slightly tighter. Still, structure and front-loading are excellent.

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 complex mutation tool with no annotations but an output schema, the description covers all critical aspects: patch behavior, confirmation triggers, error cases, and the migration path from set_rule_enabled. Nothing essential is missing for an agent to call it correctly.

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 meaningful context beyond schema: it explains that conditions and actions are replaced wholesale (vs. merged), ties match_logic to confirmation prompting, and identifies reversible vs. irrecoverable fields. This elevates the semantics beyond mere parameter 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?

States a specific verb ('Update') and resource ('existing Mail.app rule') with patch semantics, immediately distinguishing it from siblings like create_rule and delete_rule. The description also clarifies the enable/disable path, reinforcing the tool's scope.

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?

Provides explicit guidance on when to use the tool, including the replacement of set_rule_enabled and the refusal condition for unsupported actions (with instruction to edit via UI). It also clarifies conditional confirmation behavior, giving agents clear decision criteria for invocation.

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

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