Mail: Empty folder except kept
mail_empty_folder_exceptClear out a folder but keep what matters — 'empty the inbox except the urgent ones'. The folder is required and never defaulted. Starred mail is kept unless you say otherwise; keep_unread, keep_urgency, keep_category, keep_from and keep_since add more exemptions, and everything kept is reported so the exemption can be checked against the count. For an ordinary folder the rest is moved to Trash and can be brought back; for Trash or Spam it is erased, which is what emptying those means. permanent=true erases from any folder. Bounded by max_delete per call. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.
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": {
"folder": "<folder>"
},
"name": "mail_empty_folder_except"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | ||
| mailbox | No | ||
| keep_from | No | ||
| permanent | No | ||
| keep_since | No | YYYY-MM-DD | |
| max_delete | No | ||
| keep_unread | No | ||
| keep_starred | No | ||
| keep_urgency | No | ||
| keep_category | No |