Skip to main content
Glama
apple-mail-mcp

apple-mail-mcp

by sweetrb

create-rule

Destructive

Creates an Apple Mail rule from conditions and actions, letting you automatically mark, flag, move, or delete matching messages; confirm settings before enabling.

Instructions

Use when: creating a new Mail rule with one or more conditions (field/operator/value) and at least one action (markRead, markFlagged, delete, or moveTo). Set matchAll to require all conditions vs. any. Returns: a confirmation naming the rule and its condition count. Do not use when: toggling an existing rule (use enable-rule / disable-rule) or removing one (use delete-rule). Use list-rules to avoid duplicating an existing rule. Safety: creates a rule that automatically acts on real mail (including delete/move actions) on an ongoing basis — confirm the conditions and actions with the user before calling.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "conditions": "<conditions>",
      "actions": "<actions>"
    },
    "name": "create-rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
actionsYes
enabledNoEnable immediately; defaults to false so the rule must be reviewed first
matchAllNo
conditionsYes

Output Schema

NameRequiredDescriptionDefault
nameNo
createdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.16.1
    • changedInput schema / properties / enabled / default
      Previous value: -trueNew value: +false
    • addedInput schema / properties / enabled / description
      Added value: +"Enable immediately; defaults to false so the rule must be reviewed first"
  2. Changed2 schema fields changedv2.10.24
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed1 schema field changedv2.10.8
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
  4. Addedv2.8.14
  5. Removedv2.8.10
  6. First observedv2.6.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, but the description goes further by disclosing the ongoing, automatic nature of the effect ("acts on real mail ... on an ongoing basis") and requiring user confirmation before calling — context the hints alone cannot convey. It also states the return value, though it stays silent on whether the rule applies retroactively to existing mail or what happens on duplicate rule names.

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?

Labeled sections (Use when / Returns / Do not use when / Safety) front-load the trigger and the exclusions, and every sentence contributes routing or safety information. No filler or redundant restatement of the schema.

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 destructive, nested-object mutation tool with an output schema, the description covers activation semantics, exclusions, and the review-before-call requirement. Missing only edge behavior such as retroactive application, duplicate-name handling, and the moveToAccount action, which keeps it short of fully complete.

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 only 20%, so the description carries real weight, and it does explain the condition triple, the action set, and matchAll's all-vs-any semantics that the schema leaves undocumented. However, it omits moveToAccount entirely and adds no meaning for name or the condition/action constraints beyond restating what the schema enforces.

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 and resource ("creating a new Mail rule") and scopes it precisely with the shape of input (one or more conditions of field/operator/value plus at least one action). The named actions and the matchAll switch let an agent distinguish this from enable-rule, disable-rule, and delete-rule without opening any schema.

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?

Explicit "Use when" clause plus a "Do not use when" clause that routes toggling to enable-rule/disable-rule and removal to delete-rule. It additionally recommends list-rules to avoid duplicating an existing rule, giving positive, negative, and preventive guidance in one place.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.