Skip to main content
Glama
sugar-crash-studios

Proton MCP Server

List Proton Mail Folders

proton_list_folders
Read-onlyIdempotent

Retrieve all mailbox folders with message and unread counts to organize and manage Proton Mail email storage.

Instructions

List all mailbox folders (INBOX, Sent, Drafts, Trash, etc.) with message counts and unread counts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
response_formatNotext

Implementation Reference

  • The registration and handler logic for the 'proton_list_folders' tool.
    server.registerTool(
      'proton_list_folders',
      {
        title: 'List Proton Mail Folders',
        description: 'List all mailbox folders (INBOX, Sent, Drafts, Trash, etc.) with message counts and unread counts',
        inputSchema: ListFoldersSchema,
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: false,
        },
      },
      async (params: z.infer<typeof ListFoldersSchema>) => {
        try {
          const folders = await listMailboxes();
    
          if (params.response_format === 'json') {
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(folders, null, 2),
                },
              ],
            };
          }
    
          // Format as markdown table
          let result = '| Folder | Messages | Unread |\n';
          result += '|--------|----------|--------|\n';
    
          for (const folder of folders) {
            const name = folder.name || folder.path;
            result += `| ${name} | ${folder.messageCount} | ${folder.unreadCount} |\n`;
          }
    
          return {
            content: [
              {
                type: 'text',
                text: result,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: 'text',
                text: `Error listing folders: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
          };
        }
      }
    );
  • Schema definition for the inputs accepted by the 'proton_list_folders' tool.
    export const ListFoldersSchema = z.object({
      response_format: z.enum(['text', 'json']).optional().default('text'),
    });
Behavior4/5

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

Annotations already indicate read-only, non-destructive, and idempotent behavior, but the description adds useful context by specifying the output includes message counts and unread counts, which helps the agent understand the return format. It does not contradict annotations.

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 a single, efficient sentence that front-loads the core purpose and includes all necessary details (folders, counts) without redundancy. Every word adds value, making it highly concise and well-structured.

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 (one optional parameter), rich annotations covering safety and behavior, and no output schema, the description is mostly complete. It specifies the output content (folders with counts), though it could mention the response_format parameter's effect on output structure.

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?

The input schema has one parameter (response_format) with 100% coverage via enum values, but the description provides no additional parameter information. Since schema_description_coverage is 0%, the baseline is 3 as the schema fully documents the parameter without description compensation.

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 specific action ('List all mailbox folders') and resource ('Proton Mail folders'), distinguishing it from siblings like proton_list_emails (which lists emails) and proton_search_emails (which searches emails). It specifies the scope includes standard folders (INBOX, Sent, etc.) with message and unread counts.

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 implies usage for retrieving folder metadata, but does not explicitly state when to use this tool versus alternatives like proton_list_emails or proton_search_emails. No guidance is provided on prerequisites, exclusions, or specific contexts where this tool is preferred.

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/sugar-crash-studios/proton-mcp-server'

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