apply_thread_action
Apply a mailbox action to all messages in a thread at once. Supports dry-run to preview changes and options like unreadOnly or syncBefore.
Instructions
Apply a reversible mailbox action to every message in a normalized thread at once. Use when you want to act on a full thread identified by threadId (e.g. archive or mark-read an entire conversation). Supports dryRun, unreadOnly to scope impact, and syncBefore to refresh the index first. Prefer batch_email_action when you have explicit emailIds rather than a threadId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| threadId | Yes | Thread id from get_threads or get_actionable_threads. | |
| action | Yes | ||
| targetFolder | No | Optional restore destination. Used only when action is restore. | |
| unreadOnly | No | Only apply the action to unread messages in the thread. | |
| continueOnError | No | Continue applying the action after an individual failure. | |
| dryRun | No | Preview the impact without mutating the mailbox. | |
| syncBefore | No | Refresh the local mailbox index from IMAP before resolving the thread. |