create_mailbox
Creates a Mail mailbox or nested folder under a required account, generating missing parent folders. Returns the address token to use with move_mail and mail_search.
Instructions
Create a Mail mailbox (folder) under one account. name may contain "/" to nest
("Projects/2026") — missing parents are created for you. account is a display name
("Personal"), an account UUID, or "On My Mac", and is REQUIRED: a folder has to land
somewhere specific.
Returns {created, mailbox, account, folder, note}. folder is the address token to
pass back verbatim to move_mail/mail_search; it works immediately, and
mail_overview will report Mail's own equivalent spelling of it once the account
syncs — both address the same mailbox. A "%" in the name is rejected (it cannot be
addressed unambiguously). There is no delete counterpart: removing a mailbox is not
scriptable, so do it in Mail. In a Gmail account the new mailbox is a label:
move_mail refuses it at either end (#291), and reads show it empty while Mail's
index does not mark it as a label. Additive (creates a folder; touches no message);
needs Automation access for Mail, plus Full Disk Access to resolve "On My Mac".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| account | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||