Modify Gmail labels
gmail_modify_labelsAdd or remove Gmail labels on a message or thread to organize, archive, mark read/unread, or star. Specify target ID and label IDs to update.
Instructions
Add and/or remove labels on one message or one whole thread. This is also how you archive and mark read/unread:
Archive: remove_label_ids: ["INBOX"]
Mark read: remove_label_ids: ["UNREAD"] · Mark unread: add_label_ids: ["UNREAD"]
Star: add_label_ids: ["STARRED"]
Args:
message_id OR thread_id (exactly one, required): target. Ids are account-specific.
add_label_ids (string[], optional), remove_label_ids (string[], optional): label IDS, not names — call gmail_list_labels to translate. At least one of the two is required.
account (string, optional): email or alias. Omit for the default account.
Returns: confirmation with the resulting label set (message) or affected thread id.
Examples:
{"message_id": "18c2...", "remove_label_ids": ["UNREAD"]}
{"thread_id": "18c2...", "add_label_ids": ["STARRED"], "remove_label_ids": ["INBOX"], "account": "work"}
Error Handling: unknown label ids return a Gmail error — list labels first. A 404 usually means the id belongs to a different account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||