gmail_apply_label
Apply a custom label to a Gmail message, creating the label if it doesn't exist. Only user-created labels are accepted; system labels are rejected, and the label id is returned.
Instructions
Attach a custom label to a message (creating it first if needed).
Only user-created labels can be applied through this tool — system labels (TRASH, SPAM, INBOX, UNREAD, IMPORTANT, ...) are rejected, so this tool cannot be used to trash, spam, or archive a message. Returns the label id that was applied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | ||
| label_name | Yes | ||
| message_id | Yes | ||
| create_if_missing | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |