Create Gmail label
google_gmail_label_createCreate a Gmail label by name, optionally nest it under another label, set palette colors, and get the new label ID for organizing mail.
Instructions
Create a label in the account's Gmail, named name (1 to 225 characters, no space at either end; / nests it under another label, as Gmail does: Work/Invoices). A name already used by a label, ignoring case, is refused. text_color and background_color set its colors, both or neither, each a #rrggbb from Gmail's fixed palette (a refusal lists it); show_in_list and show_in_messages say whether it shows in the label list and on messages. Each call makes a new label; put it on mail with google_gmail_label. Returns the new label_id and its name. account is needed when several accounts are set up.
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": {
"name": "<name>"
},
"name": "google_gmail_label_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The new label's name, 1 to 225 characters with no space at either end; `/` nests it under another label, as Gmail does (`Work/Invoices`). | |
| account | No | The account's label. Left out, the only account is used; with several accounts, the call fails and lists them. | |
| text_color | No | The label's text color as `#rrggbb`, from Gmail's palette; given together with `background_color`. | |
| show_in_list | No | Whether the label shows in the label list (default: Gmail's own default, shown). | |
| background_color | No | The label's background color as `#rrggbb`, from Gmail's palette; given together with `text_color`. | |
| show_in_messages | No | Whether the label shows on messages in the message list (default: Gmail's own default, shown). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The label's name as Google reports it. | |
| label_id | Yes | The new label's id, which the label tools take. |