Bulk action by sender
mail_bulk_by_senderMove or delete every message from one exact sender in a folder, up to 5,000 per call, with a dry-run count first so you can confirm before anything changes.
Instructions
Move EVERY message from a sender (exact address) in a folder (Inbox by default) to another folder, or to Deleted Items, at most 5,000 per call. A dry run by default: it only counts the messages it would act on (matched) and changes nothing. Tell the user that count and, once they confirm, call again with dryRun: false. capped: true means the sender has more than 5,000 messages there: call again for the rest. Never deletes permanently (see mail_purge).
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": {
"from": "<from>",
"action": "<action>"
},
"name": "mail_bulk_by_sender"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | Yes | Exact sender address | |
| action | Yes | move = move to targetFolder; delete = move to Deleted Items | |
| dryRun | No | Default true: count only, change nothing. false = act, once the user has confirmed. | |
| folder | No | Source folder. Default: inbox | |
| targetFolder | No | Required when action = move |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| moved | No | ||
| capped | Yes | true when the sender has more than 5,000 messages in the folder | |
| dryRun | Yes | ||
| failed | Yes | ||
| matched | Yes | Messages acted on, or that would be with a dry run (at most 5,000) | |
| succeeded | Yes |