Modify Labels on a Gmail Message
gmail_modify_message_labelsAdd or remove labels on a specific Gmail message by ID, enabling actions like archiving, starring, or applying custom tags.
Instructions
Add or remove labels (tags) on a specific Gmail message.
Args:
message_id (string): The Gmail message ID
add_label_ids (string[]): List of label IDs to add (optional)
remove_label_ids (string[]): List of label IDs to remove (optional)
Use gmail_list_labels to find label IDs. Common system label IDs:
INBOX, STARRED, IMPORTANT, SENT, TRASH, SPAM, UNREAD, READ
Returns: Updated message with its current label IDs.
Examples:
Use when: "Tag message abc123 with label Label_456"
Use when: "Remove INBOX label from message abc123 (archive it)"
Use when: "Star message abc123" -> add_label_ids: ["STARRED"]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message_id | Yes | Gmail message ID | |
| add_label_ids | No | Label IDs to add (e.g. ['Label_123', 'STARRED']) | |
| remove_label_ids | No | Label IDs to remove (e.g. ['INBOX']) |