modify_message_labels
Add and/or remove labels on one Gmail message in a single call (e.g. add STARRED, remove UNREAD). Pass label ids from list_labels (system labels like STARRED/IMPORTANT/UNREAD/TRASH work directly by name). Pass account when more than one Gmail account is connected (see list_accounts). Needs gmail.modify — accounts connected before this feature get a reconnect hint. This actually changes the mailbox — confirm with the user before calling for anything beyond routine triage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account label the message belongs to. Required when several Gmail accounts are connected. | |
| message_id | Yes | Gmail message id (from get_thread's messages, or a label/draft result). | |
| add_label_ids | No | Label ids to add (see list_labels for ids; system labels like STARRED/IMPORTANT/UNREAD also work). | |
| remove_label_ids | No | Label ids to remove. |