delete_folder
Delete an empty mail folder by its Graph folder ID. Prevents accidental data loss by aborting if the folder contains messages or subfolders.
Instructions
Delete a mail folder. Refuses to delete folders that aren't empty.
Reads the folder first and aborts if totalItemCount > 0 or
childFolderCount > 0. This is a small safety net against accidentally
nuking a folder with real messages; there is a small race window between
the read and the delete, so don't rely on this for adversarial safety.
Args: folder_id: Graph folder id. Required. mailbox: Optional mailbox (email or user id) for shared mailboxes.
Returns: {"deleted": True, "id": }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mailbox | No | ||
| folder_id | Yes |