Create a label
labels_createCreate a label in a connected mailbox and answer the id it is applied by. In a Gmail mailbox, and as a folder in one whose provider is imap or in an Outlook mailbox, a / nests it under the label before it, made first where missing. An Outlook mailbox makes a folder where the name holds a / or folder is true, and a category otherwise.
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": {
"mailbox": "<mailbox>",
"name": "<name>"
},
"name": "labels_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | What the label is called. | |
| folder | No | In an Outlook mailbox, true makes a folder rather than a category. | |
| mailbox | Yes | The mailbox's name or its email address. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| type | No | ||
| messagesTotal | No | ||
| messagesUnread | No |