Mark all matching read
mark_all_readMark every email matching a query as read in one pass. Preview changes with dryRun and confirm batches over 100.
Instructions
Mark every message matching a query as read in one pass — e.g. {query:'is:unread', mailbox:'[Gmail]/Spam'}. Reaches Spam/Trash via the mailbox param. Use dryRun:true to preview the count; confirm:true for batches over 100.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | No | Cap on messages acted on this call for trash/move/delete/empty (default 2000, keeps calls under the timeout). If the result is done:false, re-run the same call (with confirm:true) to continue until done:true. | |
| query | No | What to match. On Gmail this is native search syntax (e.g. 'older_than:1y is:unread'); on other providers a text match. Omit to match the whole mailbox. | |
| dryRun | No | Preview only: return the matched count + a small sample, changing nothing. | |
| account | No | Gmail address to act on. Omit to use the default account. | |
| confirm | No | Required to actually run a destructive or large (>100) batch. | |
| mailbox | No | Mailbox/label to run in (e.g. '[Gmail]/Spam'). Omit for the account's whole-mail scope (Gmail: All Mail). |