create-rule
Create a rule to automate email actions (mark, delete, move) based on conditions like sender, subject, or content.
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| actions | Yes | ||
| enabled | No | ||
| matchAll | No | ||
| conditions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| created | No |