plan_create_filter
Preview a Gmail filter for a sender, domain, or search query and see which existing mail it would affect before approving execution via a plan ID.
Instructions
Dry run: changes nothing. Returns what would be affected and a plan_id for execute_plan. Show the user the summary before asking whether to execute. A Gmail filter for future mail, matched by one sender or domain (from) or any Gmail search (query), with one action or several combined as in Gmail's filter dialog: archive (skip inbox), trash (block), label, never_spam, mark_read, star, important, never_important, categorize, forward. Reports how much existing mail matches; plan_modify handles that mail.
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": {
"mailbox": "<mailbox>"
},
"name": "plan_create_filter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Sender address or domain (give this or query) | |
| label | No | Label name, for label and label_and_archive | |
| query | No | Gmail search, e.g. "from:(a@x.com OR b@y.com)" (give this or from) | |
| action | No | One action (or use actions) | |
| actions | No | Several actions together | |
| mailbox | Yes | A connected mailbox address (see list_mailboxes) | |
| category | No | Tab, for categorize | |
| forward_to | No | A confirmed forwarding address, for forward |