Preview mail rule
preview_mail_rulePreview a proposed mail rule to verify it is valid and count how many existing messages or conversations it would match before creating or applying it.
Instructions
Validate a proposed mail rule and estimate its effect WITHOUT creating or changing anything — returns whether the rule is valid, warnings, how many existing messages and conversations currently match, and a plain-language summary of what would happen. Use this before create_mail_rule when the user should see the blast radius first, and always before applying a rule to existing mail (large backfills require the count to be confirmed). This tool never modifies mail and never installs a rule.
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": {
"actions": "<actions>",
"conditions": "<conditions>"
},
"name": "preview_mail_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional human-readable rule name, e.g. "Archive GitHub Notifications". | |
| match | No | How multiple conditions combine: "all" = every condition must match (AND), "any" = one is enough (OR). | all |
| actions | Yes | What happens to a matching message — one or more actions, applied in order. | |
| conditions | Yes | When the rule fires; at least one is required. Matching is case-insensitive substring matching. | |
| existingMail | No | The existing-mail policy being considered — its scope decides where matches are counted (default: inbox). |