Microsoft 365 List Email Folders
m365_list_email_foldersUse this when the user wants the mail folders of their Microsoft 365 / Outlook account as the Exchange server has them: every folder and subfolder with its id, name, path (Parent/Child), parent_id, total and unread counts. A folder's id, name or path goes to m365_list_emails and m365_search_emails (folder), m365_create_email_folder (parent) and m365_move_email (destination). For the folders of an account in the Mac's Mail app, use list_email_folders.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "m365_list_email_folders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Which connected Microsoft 365 account to use: its email (UPN), its id from list_m365_accounts, or its display name when unique. Leave it out to use the default account. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| account | No | The email (UPN) of the Microsoft 365 account this call used. | |
| folders | Yes | ||
| truncated | Yes | true when the account has more folders than one call lists (500, or 8 levels deep). |