Skip to main content
Glama
chandshy
by chandshy

Get Folders

get_folders
Read-only

List all email folders with message counts, identifying system mailboxes by IMAP special-use attributes to correctly locate Trash, Sent, and other folders on localized accounts.

Instructions

List all email folders with message counts. Labels appear as folders with the Labels/ prefix (e.g. Labels/Work). Each folder reports folderType (system | user-folder | label) and, for system mailboxes, the IMAP specialUse attribute (\Inbox \Sent \Drafts \Trash \Junk \Archive \All \Flagged) — use these to identify the real Trash/Sent/Archive on a localised account rather than matching English names, and to avoid moving mail into the \All (All Mail) union view.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idNoOptional account ID to route this call to (multi-account configs). Omit to use the active account. Configured account IDs are listed in the settings UI (Accounts tab).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
foldersYes
Behavior5/5

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

The description goes beyond the readOnlyHint and openWorldHint annotations by detailing that the tool returns message counts, folder types, and specialUse attributes. It also discloses the behavioral trait of labels appearing as folders with a prefix and warns about the \All special use, giving agents safe usage guidance.

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 front-loaded with the main purpose and then adds necessary details. It is well-structured but slightly longer than minimal; however, each sentence adds value.

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?

Given the tool has a single optional parameter, annotations, and an output schema, the description covers all key aspects: listing folders with counts, folder types, specialUse, and the important warning about the \All union view. The agent has complete context to use the tool correctly.

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

Parameters3/5

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

With 100% schema description coverage, the input schema already fully documents the single optional parameter 'account_id'. The tool description does not add parameter-specific meaning, so baseline score of 3 is appropriate.

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?

The description clearly states the tool lists all email folders with message counts, and explains labels appear with 'Labels/' prefix. It distinguishes from sibling tools like 'list_labels' and 'sync_folders' by detailing folderType and IMAP specialUse attributes.

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?

The description provides guidance on when to use this tool—specifically to identify the real Trash/Sent/Archive using specialUse attributes rather than English names. It also warns against moving mail into the \All (All Mail) union view. However, it does not explicitly mention alternative tools for other scenarios.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chandshy/mailpouch'

If you have feedback or need assistance with the MCP directory API, please join our Discord server