bulk_manage_messages
Bulk-manage messages in any folder: scan with client-side filtering, then perform dry-run, delete, move, or mark-read actions. Supports limit, folder, sender, subject, unread, and date filters.
Instructions
Bulk-manage messages with filtering. Supports dry-run, delete, move, and mark-read actions.
By default (limit=None) this scans the entire folder newest-first, so
"find/act on all messages matching X" sees the whole folder, not a window.
Pass limit only to cap how many messages are scanned (e.g. limit=200
scans at most the newest 200); the value is honored exactly, never silently
clamped. Filtering is client-side.
The response reports coverage honestly: truncated is False only when the
scan reached the end of the folder (stop_reason="folder_exhausted"), so a
match count is a true total; if limit cut the scan short it is True. The
mailbox is live, so counts are a point-in-time snapshot. Collection and action
are separate phases; messages moved or deleted between them are reported as
already_gone, not errors.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| action | No | delete | |
| folder | No | inbox | |
| dry_run | No | ||
| account_id | No | ||
| destination | No | ||
| unread_only | No | ||
| received_after | No | ||
| sender_contains | No | ||
| subject_contains | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||