Skip to main content
Glama
adamzaidi

icloud-mcp

by adamzaidi

run_rule

Execute a saved email management rule in iCloud Mail to organize or process messages. Use dryRun mode to preview changes before applying them.

Instructions

Run a specific saved rule by name. Use dryRun: true to preview what would be affected without making changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesRule name to run
dryRunNoIf true, preview what would be affected without making changes

Implementation Reference

  • The 'runRule' function retrieves a rule by name, executes its associated action (using 'executeRule'), and updates the rule's metadata (lastRun, runCount) in the storage if dryRun is false.
    export async function runRule(name, dryRun = false) {
      const data = readRules();
      const rule = data.rules.find(r => r.name === name);
      if (!rule) throw new Error(`Rule '${name}' not found.`);
      const result = await executeRule(rule, dryRun);
      if (!dryRun) {
        rule.lastRun = new Date().toISOString();
        rule.runCount = (rule.runCount || 0) + 1;
        writeRules(data);
      }
      return { rule: name, action: rule.action.type, ...result };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains dryRun behavior but omits critical details: whether the tool performs writes (likely given email-related siblings), what actions the rule executes (move/delete/flag), side effects, return values, or reversibility.

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 consists of exactly two efficient sentences with no filler: the first establishes purpose immediately, and the second provides the most critical usage hint (dryRun). Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool likely performing mutations on email state (given the ecosystem of bulk_move, bulk_delete siblings), the description is incomplete. It lacks output format details, error handling, and—critically—any description of what 'running' a rule actually does to the user's data.

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?

The input schema has 100% description coverage ('Rule name to run' and dryRun explanation), establishing a baseline of 3. The description adds minimal semantic value beyond the schema, essentially restating the dryRun parameter description verbatim rather than adding context about valid rule names or usage patterns.

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 the specific verb ('Run') and resource ('saved rule'), and distinguishes itself from siblings like 'create_rule', 'delete_rule', and 'run_all_rules' by emphasizing 'specific saved rule by name'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage guidance by explaining the dryRun parameter's purpose (previewing changes), but fails to explicitly differentiate when to use this single-rule tool versus the sibling 'run_all_rules' tool or state prerequisites (e.g., rule must exist).

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/adamzaidi/icloud-mcp'

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