Skip to main content
Glama

List mail folders

list_folders
Read-only

Lists the folders of a mailbox: path and, when set, special use (\Inbox, \Drafts, \Sent, \Archive, \Junk, \Trash...). On Gmail, labels appear as folders. The paths are the values accepted by folder in the mail tools and by destination in move_message.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "accountId": "<accountId>"
    },
    "name": "list_folders"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountIdYesAccount id, as returned by list_accounts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

The annotations already declare this is a read-only, non-destructive, open-world operation, so the description is not required to repeat those safety traits. It adds useful behavioral context by explaining what the output contains (folder paths and optional special-use markers) and how Gmail labels are represented, though it does not discuss ordering, empty results, or pagination.

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

Conciseness5/5

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

The description is short, front-loaded with the core action, and free of unnecessary wording. It efficiently adds output semantics, Gmail-specific behavior, and cross-tool value in only three sentences.

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 simple read-only, one-parameter listing tool, the definition is complete enough: the schema covers the required account ID, annotations cover safety, and the description explains the returned folder values and their downstream use. The absence of an output schema is mitigated by the description stating what the output paths mean.

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?

There is only one parameter, `accountId`, and the schema already documents it fully as an account ID returned by list_accounts. The description does not add parameter-level meaning beyond the schema, so the high schema coverage makes the baseline score 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 states a specific verb and resource: it lists the folders of a mailbox. It also specifies the output meaning (path and optional special-use flag) and explains how Gmail labels map to folders, so an agent can distinguish this tool from message-listing or account-listing siblings.

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 gives clear context for downstream use by stating that returned paths are accepted by `folder` in mail tools and by `destination` in move_message. It does not explicitly say to call this before moving or filtering messages, nor does it state when not to use it, but the practical usage is easy to infer.

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