delete_folder
Delete a folder or label container without destroying messages. Folder contents move to All Mail; label tag is removed. Use for cleanup of unwanted paths.
Instructions
Delete a mailbox folder or label container. Restricted to the "Folders/" and "Labels/" namespaces to protect system mailboxes (INBOX, Sent, Trash, etc.).
On Proton Mail this is not a destructive message operation: deleting a folder relocates its contents into "All Mail"; deleting a label simply removes the label tag and leaves the underlying message in its source folder. No confirm flag is required.
Accepts . and .. path segments by design — IMAP treats paths as opaque literal names with no parent-directory semantics, so this is the cleanup path for adversarial folder names left behind by other IMAP clients (or older versions of this server). create_folder and rename_folder reject those segments so confusable paths cannot be introduced through this tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to delete (e.g. "Folders/Old", "Labels/Archived"). Must start with "Folders/" or "Labels/". |