create_rule
Create automated email rules to organize iCloud Mail by applying actions like move, delete, or mark to messages matching specific filters such as sender, subject, or date.
Instructions
Create a saved rule that applies a specific action to emails matching a set of filters. Rules are stored persistently and can be run on demand or all at once with run_all_rules.
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>",
"filters": "<filters>",
"action": "<action>"
},
"name": "create_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Unique rule name (used to run or delete the rule) | |
| action | Yes | Action to apply to matching emails | |
| filters | Yes | Email filters (same as bulk_move/bulk_delete filters: sender, domain, subject, before, since, unread, flagged, larger, smaller) | |
| description | No | Optional human-readable description of what the rule does |