List Folders
listFoldersLists Thunderbird mail folders with paths, types, account IDs, message and unread counts, depth, and favorite status so you can find the folderPath needed for message searches or refreshes.
Instructions
List mail folders, flat: name, path (the URI every folderPath takes), type (inbox, sent, drafts, trash, junk...), accountId, total and unread counts, depth, isFavorite. Use it to find a folderPath; messages: searchMessages or getRecentMessages. refresh (with folderPath) first fetches new mail from the server, up to 20 s.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | 'objects' (default) or 'table' ({ columns, rows }, compact) | |
| refresh | No | With folderPath: first fetch its new mail from the mail server (waits up to 20 s); returns { refresh, folders } | |
| accountId | No | Account ID (from listAccounts): only its folders | |
| folderPath | No | Folder URI: only that folder and its subfolders | |
| favoritesOnly | No | Only the folders the user marked as favorites | |
| savedSearches | No | If true, return only saved searches (virtual folders) with their folders and conditions |