gmail_unsubscribe
Unsubscribe from a Gmail mailing list or newsletter using Gmail’s built-in unsubscribe action; requires confirm=true and fails when no unsubscribe header exists.
Instructions
Unsubscribe from a mailing list / newsletter with Gmail's own Unsubscribe (outward, irreversible).
Gmail offers it only for messages with a recognised unsubscribe header; otherwise the op fails with not_found and lists the available actions.
Requires confirm=true (outward-facing or destructive).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Row index from gmail.list / gmail.search; omit to use the open conversation. | |
| query | No | Run this Gmail search first and take `index` from its results. | |
| folder | No | Open this folder/label first and take `index` from it. | |
| confirm | No | Must be true: this action is outward-facing or destructive. | |
| keep_unread | No | If the conversation was unread, mark it unread again afterwards. | |
| message_index | No | Message of the thread (0 = oldest, numbering of gmail.read); default the last. | |
| expect_subject | No | Safety check: the conversation's subject must contain this text (case-insensitive), otherwise nothing is done (not_found). |