Skip to main content
Glama

list_mailboxes

Retrieve all mailboxes for an email account, showing mailbox names and unread message counts. Use this tool to view mailbox structure and monitor unread emails.

Instructions

List all mailboxes for an email account.

Args: account: Account name. Uses JXA_MAIL_DEFAULT_ACCOUNT env var or first account if not specified.

Returns: List of mailbox dictionaries with 'name' and 'unreadCount' fields.

Example: >>> list_mailboxes("Work") [{"name": "INBOX", "unreadCount": 5}, ...]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the return format and includes an example, which adds value beyond basic functionality. However, it doesn't cover aspects like error handling, performance implications, or authentication needs, leaving some behavioral traits unspecified.

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 well-structured and appropriately sized, with a clear purpose statement, parameter explanation, return details, and an example—all in a concise format. Each sentence adds value without redundancy, making it easy to scan and understand.

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

Completeness4/5

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

Given the tool's low complexity (1 parameter) and the presence of an output schema (implied by the return description), the description is fairly complete. It covers purpose, parameter usage, and return format with an example. However, it could improve by addressing sibling tool differentiation or more behavioral details, but it's adequate for the context.

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?

The input schema has 0% description coverage, but the description compensates by explaining the 'account' parameter's semantics, including its optional nature and default behavior using environment variables. This adds meaningful context beyond the schema, though it could be more detailed about format or constraints.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('List') and resource ('all mailboxes for an email account'), making it easy to understand what it does. However, it doesn't explicitly differentiate from sibling tools like 'list_accounts', which lists accounts rather than mailboxes, though this distinction is implied by the resource focus.

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

Usage Guidelines3/5

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

The description provides some usage context by mentioning the default behavior when the 'account' parameter is not specified, but it doesn't explicitly state when to use this tool versus alternatives like 'get_emails' or 'search_emails'. The implied usage is for listing mailboxes rather than emails, but no clear exclusions or comparisons are given.

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/imdinu/jxa-mail-mcp'

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