create_label
Create Gmail labels with optional nested hierarchy, automatically building any missing parent labels. Returns the new label ID for applying labels to messages and threads.
Instructions
Create a new Gmail label in one account. Nested labels use "/" in the name ("Work/Invoices"); any missing parent labels are created too, so the hierarchy shows up correctly in Gmail. Returns the new label id — use that id with label_messages/label_thread, and the display name in label: search queries.
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": {
"account": "<account>",
"name": "<name>"
},
"name": "create_label"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Label name. Use "/" for nesting, e.g. "Work/Invoices". | |
| account | Yes | Account id ("personal", "tamu"). | |
| label_list_visibility | No | Gmail labelListVisibility value (default: labelShow). | labelShow |
| message_list_visibility | No | Gmail messageListVisibility value (default: show). | show |