List Email Folders
list_email_foldersLists the full folder (mailbox) tree for Apple Mail (Mail.app) accounts, including nested subfolders. Use this to discover the exact folder names that move_email(target_mailbox=...) and list_emails(mailbox=...) expect. Outlook.com, Exchange, Gmail, iCloud and IMAP accounts added to Mail.app are all included. For a Graph-only Microsoft 365 mailbox not added to Mail.app, use m365_list_emails instead.
Pass account= (from list_email_accounts) to enumerate one account fully; without it, every account is walked which can be slow on macOS 15+. Message counts are off by default (slow on IMAP) — pass include_counts=true to add unread/total per folder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | ||
| include_counts | No | false |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accounts | No | ||
| truncated | No | ||
| folder_count | No | ||
| next_actions | No | ||
| account_count | No |