modify_labels
Apply custom label combinations to Gmail threads: add or remove labels by name or ID, auto-create new labels, and handle archive or mark-as-read by removing INBOX/UNREAD.
Instructions
Add/remove labels on a thread. Archive = remove 'INBOX'; mark read = remove 'UNREAD'. Labels may be given by name or by id: an unknown name in add is created automatically (use '/' for nested labels), an unknown name in remove is ignored. USE WHEN: applying custom labels or label combinations in one call. DO NOT USE: for plain archive/read/unread — the dedicated tools are clearer. SIDE EFFECTS: changes the thread's labels (and may create a label named in add); reversible by the inverse call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | ||
| remove | No | ||
| threadId | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes |