create_folder
Create a folder in a mailbox. For a subfolder, give the full path with the separator the mailbox already uses in its folder names, such as Projects/2026. Missing parent folders are created too. If the folder already exists, it is returned unchanged. System folder names, including Inbox, Sent and Trash, are rejected. In Gmail, the folder is a label. Call list_folders first to see how the mailbox writes folder paths.
Create a folder in a mailbox. For a subfolder, give the full path with the separator the mailbox already uses in its folder names, such as Projects/2026. Missing parent folders are created too. If the folder already exists, it is returned unchanged. System folder names, including Inbox, Sent and Trash, are rejected. In Gmail, the folder is a label. Call list_folders first to see how the mailbox writes folder paths.
Permissions
Required capabilities: mail.organize.
Inputs
| Name | Required | Type | Details |
|---|---|---|---|
accountId | No | string or null | Account to operate on. Optional when exactly one account is connected. Minimum length: 1. Maximum length: 512. |
name | Yes | string | Folder name, or the full path of a subfolder, such as Receipts or Projects/2026. Minimum length: 1. Maximum length: 512. |
{
"type": "object",
"properties": {
"accountId": {
"description": "Account to operate on. Optional when exactly one account is connected.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 512
},
{
"type": "null"
}
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 512,
"description": "Folder name, or the full path of a subfolder, such as Receipts or Projects/2026."
}
},
"required": [
"name"
],
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false
}Last updated
create_draft
Create a draft in the mailbox. With replyToMessageId, the draft is a reply: recipients and a subject left out come from the original message, replyAll includes all of its recipients, and the original message is quoted below the body unless quoteOriginal is false.
create_label
Create a Gmail label or an Outlook category in a mailbox. If the mailbox already has one with that name, it is returned unchanged. In Gmail, a name such as Projects/2026 creates a nested label and any missing parent labels, and the label also works as a folder. Gmail refuses names it uses for system labels and folders, such as Inbox, Archive and Starred. A new Outlook category has no color. IMAP mailboxes don't have labels.