Skip to main content
Glama

Mail Folders

folders
Destructive

Manage Outlook mailbox directories: list the hierarchy, create nested paths, move messages, get unread counts, or delete safely with a dry-run preview.

Instructions

Manage mail folders. Address a folder by name, by slash-separated path for nested folders (e.g. Inbox/Clients/Acme, case-insensitive) or by ID; a bare name matches a unique top-level folder first, then nested ones (an ambiguous name returns the candidates). action=list (default) returns the tree with each folder's path and id (includeItemCounts, includeChildren). action=create makes name under the root or parentFolder/parentFolderId. action=move moves emailIds into targetFolder/targetFolderId. action=stats returns total/unread counts for folder or folderId. action=delete removes a folder (folderName/path or folderId) with everything in it, subfolders included. It skips Deleted Items and Graph documents no restore path, so pass dryRun: true first to see what would be lost. Protected folders (Inbox, Sent Items, etc.) can't be deleted. Every action accepts sharedMailbox (alias email) to work in a shared or delegated mailbox (default: your own).

Input Schema

NameRequiredDescriptionDefault
nameNoName of the folder to create (action=create, required)
emailNoAlias for `sharedMailbox`.
actionNoAction to perform (default: list)
dryRunNoPreview only (action=delete): nothing is deleted. Shows the folder and how many items and subfolders would be lost. Other actions refuse dryRun and change nothing. Default false.
folderNoFolder name or path (inbox, sent, "Triage/Delete", etc.). Default: inbox (action=stats)
emailIdsNoComma-separated list of email IDs to move (action=move, required)
folderIdNoFolder ID (action=stats/delete)
folderNameNoFolder name or path to delete — resolved to ID (action=delete). Cannot delete protected folders (Inbox, Drafts, Sent, etc.)
parentFolderNoParent folder name or path (e.g. "Clients/Acme"); default is root (action=create)
sourceFolderNoIgnored: action=move moves each email by ID from wherever it is. Accepted for older callers.
targetFolderNoDestination folder name or path, e.g. "Triage/Delete" (action=move; or use targetFolderId)
sharedMailboxNoEmail address of a shared/delegated mailbox to target (all actions; default: the signed-in account). Requires delegate access + Mail.Read.Shared (list/stats) or Mail.ReadWrite.Shared (create/move/delete). Work/school only; needs the server opt-in setting OUTLOOK_SHARED_MAILBOX (otherwise the call is refused with setup guidance).
parentFolderIdNoParent folder ID — alternative to parentFolder for unambiguous targeting (action=create)
targetFolderIdNoDestination folder ID — alternative to targetFolder for unambiguous/nested targeting (action=move)
includeChildrenNoInclude child folders in hierarchy (action=list)
outputVerbosityNoOutput detail level (action=stats, default: standard)
includeItemCountsNoInclude counts of total and unread items (action=list)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv3.14.1
    • addedInput schema / properties / dryRun
      Added value: +{
      +  "description": "Preview only (action=delete): nothing is deleted. Shows the folder and how many items and subfolders would be lost. Other actions refuse dryRun and change nothing. Default false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / email
      Added value: +{
      +  "description": "Alias for `sharedMailbox`.",
      +  "type": "string"
      +}
    • addedInput schema / properties / sharedMailbox
      Added value: +{
      +  "description": "Email address of a shared/delegated mailbox to target (all actions; default: the signed-in account). Requires delegate access + Mail.Read.Shared (list/stats) or Mail.ReadWrite.Shared (create/move/delete). Work/school only; needs the server opt-in setting OUTLOOK_SHARED_MAILBOX (otherwise the call is refused with setup guidance).",
      +  "type": "string"
      +}
    • changedInput schema / properties / sourceFolder / description
      Previous value: -"Source folder name, default is inbox (action=move)"New value: +"Ignored: action=move moves each email by ID from wherever it is. Accepted for older callers."
  2. Addedv3.9.1
  3. Removedv3.9.0
  4. Changed1 schema field changedv3.7.4
    • addedInput schema / additionalProperties
      Added value: +false
  5. First observedv3.4.1

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true, but the description adds substantial context the annotations cannot convey: delete wipes subfolders too, skips Deleted Items, and has no restore path; dryRun previews losses; protected folders are undeletable; sharedMailbox requires delegate access plus Mail.Read.Shared/Mail.ReadWrite.Shared and the OUTLOOK_SHARED_MAILBOX server opt-in, otherwise the call is refused.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the tool's core behavior, then a compact action-by-action walkthrough; every sentence carries operational information. It is a dense single paragraph rather than a scannable structure, which slightly hurts readability for a 17-parameter multi-action tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex five-action, 17-parameter tool with no output schema, the description covers addressing semantics, per-action defaults, the dryRun safety workflow, protected-folder constraints, and shared-mailbox prerequisites. Nothing an agent needs to call any action correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description goes further by documenting folder addressing rules the schema does not: name vs slash-separated path (case-insensitive) vs ID, bare-name resolution order (unique top-level first, then nested), and ambiguity returning candidates. Defaults for list/stats and sharedMailbox aliasing are also clarified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Manage mail folders') and then enumerates each of the five actions with its concrete effect (list returns the tree with paths/ids, create makes a name under a parent, move relocates emailIds, stats returns counts, delete removes a folder and its contents). An agent can tell this apart from siblings like manage-rules or access-shared-mailbox without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use detail per action, states the default (action=list), and includes when-not guidance (protected folders can't be deleted, pass dryRun first before destructive deletes). It does not, however, route the agent away from sibling tools that also touch mail organization (manage-rules, manage-category), so the alternative-selection layer is only intra-tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.