folders
List, create, move emails between, and delete mail folders. Get folder statistics for inbox management.
Instructions
Manage mail folders (tool-level destructiveHint=true because delete permanently removes a folder; list and stats are read-only sub-actions despite the annotation). Folders can be addressed by name, by a slash-separated PATH for nested folders (e.g. Triage/Delete, Inbox/Clients/Acme, case-insensitive), or by explicit ID; list output includes each folder's full path and [id: …]. A bare name resolves a unique top-level folder first, then searches nested folders (ambiguous names return the candidates — disambiguate with a path or ID). action=list (default) returns the folder tree (toggle includeItemCounts for unread/total, includeChildren for hierarchy). action=create makes a new folder under the root, or under parentFolder (name/path) / parentFolderId, and returns its id. action=move relocates emails (emailIds) into targetFolder (name/path) or targetFolderId. action=stats returns counts (totalItemCount/unreadItemCount) for folder (name/path) or folderId, suitable for pagination planning. action=delete removes a folder (by folderName/path or folderId) and its contents — on Outlook.com the folder is moved to Deleted Items (recoverable until you empty it); M365/Exchange accounts may hard-delete per retention policy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name of the folder to create (action=create, required) | |
| action | No | Action to perform (default: list) | |
| folder | No | Folder name or path (inbox, sent, "Triage/Delete", etc.). Default: inbox (action=stats) | |
| emailIds | No | Comma-separated list of email IDs to move (action=move, required) | |
| folderId | No | Folder ID (action=stats/delete) | |
| folderName | No | Folder name or path to delete — resolved to ID (action=delete). Cannot delete protected folders (Inbox, Drafts, Sent, etc.) | |
| parentFolder | No | Parent folder name or path (e.g. "Clients/Acme"); default is root (action=create) | |
| sourceFolder | No | Source folder name, default is inbox (action=move) | |
| targetFolder | No | Destination folder name or path, e.g. "Triage/Delete" (action=move; or use targetFolderId) | |
| parentFolderId | No | Parent folder ID — alternative to parentFolder for unambiguous targeting (action=create) | |
| targetFolderId | No | Destination folder ID — alternative to targetFolder for unambiguous/nested targeting (action=move) | |
| includeChildren | No | Include child folders in hierarchy (action=list) | |
| outputVerbosity | No | Output detail level (action=stats, default: standard) | |
| includeItemCounts | No | Include counts of total and unread items (action=list) |