Gmail Manage Labels
gmail_manage_labelsCreate, rename, recolor, or delete Gmail user labels to organize mail. Use it to set up label structure and visibility; apply labels to messages separately.
Instructions
Create, update or delete a Gmail user label. To put labels on mail or take them off use gmail_modify_messages, and to see existing labels gmail_list_labels. Returns status 'ok' and action with label (id, name, type, message_list_visibility, label_list_visibility, background_color, text_color) for create and update, or label_id for delete; status 'cancelled' if the user declines a delete. Deleting asks the user to confirm and cannot be undone; Gmail removes the label from every message, but the messages are kept.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "gmail_manage_labels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Label name to create, or the new name for update; a '/' nests it under a parent, e.g. 'Clients/Acme'. Must differ from every existing label. | |
| label | No | For update and delete: the label's name as shown in Gmail or its ID (Label_...); an unknown or ambiguous name fails with not_found and the candidates. Not used by create. | |
| action | Yes | 'create' adds a user label (needs name); 'update' renames it or changes its visibility or color (needs label; omitted fields keep their values); 'delete' removes it after the user confirms. | |
| text_color | No | Text color as a hex value from Gmail's label palette, e.g. '#ffffff'; set it together with background_color. | |
| background_color | No | Background color as a hex value from Gmail's label palette, e.g. '#fb4c2f'; set it together with text_color. | |
| label_list_visibility | No | Whether the label appears in Gmail's label list always, only when it has unread mail, or never. | |
| message_list_visibility | No | Whether messages with this label show it in the message list ('show') or not ('hide'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | Gmail label. | |
| action | No | ||
| status | No | Machine-readable operation status. | |
| label_id | No |