Skip to main content
Glama

List Email Folders

list_email_folders
Read-only

Lists the full folder (mailbox) tree for Apple Mail (Mail.app) accounts, including nested subfolders. Use this to discover the exact folder names that move_email(target_mailbox=...) and list_emails(mailbox=...) expect. Outlook.com, Exchange, Gmail, iCloud and IMAP accounts added to Mail.app are all included. For a Graph-only Microsoft 365 mailbox not added to Mail.app, use m365_list_emails instead.

Pass account= (from list_email_accounts) to enumerate one account fully; without it, every account is walked which can be slow on macOS 15+. Message counts are off by default (slow on IMAP) — pass include_counts=true to add unread/total per folder (from Mail's local index when a named account resolves from disk, or Mail.app's own live count otherwise — see unread_count_note in the response either way).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoMail.app account whose folder tree to list (from list_email_accounts). Defaults to every account.
include_countsNoInclude the message count of each folder. Slower, because each folder has to be counted.false

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountsNo
truncatedNo
folder_countNo
next_actionsNo
account_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / account / description
      Added value: +"Mail.app account whose folder tree to list (from list_email_accounts). Defaults to every account."
    • addedInput schema / properties / include_counts / description
      Added value: +"Include the message count of each folder. Slower, because each folder has to be counted."
  2. Changed2 schema fields changed
    • removedInput schema / properties / account / description
      Removed value: -"Mail.app account whose folder tree to list (from list_email_accounts). Defaults to every account."
    • removedInput schema / properties / include_counts / description
      Removed value: -"Include the message count of each folder. Slower, because each folder has to be counted."
  3. Changed2 schema fields changed
    • addedInput schema / properties / account / description
      Added value: +"Mail.app account whose folder tree to list (from list_email_accounts). Defaults to every account."
    • addedInput schema / properties / include_counts / description
      Added value: +"Include the message count of each folder. Slower, because each folder has to be counted."
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare read-only and non-destructive, so the bar is lower. The description adds meaningful behavioral context: it includes nested subfolders, covers various account types, warns about slow performance when scanning all accounts on macOS 15+, and explains the source of message counts (local index vs live count) plus the unread_count_note in the response. No contradiction with annotations.

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?

The description is information-dense with no filler, but it runs longer than necessary because it covers multiple caveats and exceptions. Each sentence earns its place, though some aggregation could tighten it. Still well-structured, purpose is front-loaded.

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?

With an output schema present and annotations covering safety, the description covers all necessary invocation details: account provenance, default behavior, performance warnings, and count semantics. Nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 100% for both parameters, but the description adds significant semantics beyond the schema: account must come from list_email_accounts and defaults to all accounts; include_counts has performance tradeoffs, defaults to off, and includes nuance about where counts come from. This enrichment justifies a top score.

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?

States a specific verb and resource: lists the full folder tree for Apple Mail accounts, including nested subfolders. It explicitly names the sibling tools that depend on its output (move_email, list_emails) and distinguishes itself from m365_list_emails for Graph-only mailboxes. Clear differentiation.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance ('Use this to discover exact folder names...') and when-not-to-use (Graph-only mailbox → use m365_list_emails instead). It also gives operational tips, such as passing account=<name> to avoid slow full walks and include_counts=true when counts are needed. This goes beyond implied usage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources