gmail_apply_label
Apply a user-created label to a Gmail message, creating the label automatically if it doesn't exist yet, and return the applied label ID. Organize emails by categorizing them with custom labels to improve inbox management and retrieval.
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 |