Skip to main content
Glama
proton-mail-mcp

proton-mail-mcp

by sethbang

Folder statistics

folder_stats
Read-onlyIdempotent

Get exact total and unread message counts for a mail folder, plus scanned aggregations such as oldest/newest dates and total bytes, with scanned/truncated flags revealing partial results.

Instructions

Return aggregate stats for a folder: total/unread (free), plus scanned-envelope aggregations (oldest/newest/total bytes). Default scanLimit 5000, max 20000. Response always includes scanned/truncated so callers can detect partial results. A non-selectable namespace container (e.g. Folders/Labels) is rejected with an actionable error rather than reporting empty stats.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "folder_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
folderNoFolder to analyze (default: INBOX).INBOX
scanLimitNoMax number of message envelopes to scan for the aggregations (oldest/newest date, total bytes), 1–20000 (default: 5000). Total/unread counts are always exact; only the scanned aggregations are capped. The response reports `scanned` and `truncated` so you know if the cap was hit — raise this for large folders if you need exact min/max dates.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed2 schema fields changedv1.0.2
    • addedInput schema / properties / folder / description
      Added value: +"Folder to analyze (default: INBOX)."
    • addedInput schema / properties / scanLimit / description
      Added value: +"Max number of message envelopes to scan for the aggregations (oldest/newest date, total bytes), 1–20000 (default: 5000). Total/unread counts are always exact; only the scanned aggregations are capped. The response reports `scanned` and `truncated` so you know if the cap was hit — raise this for large folders if you need exact min/max dates."
  3. First observedv1.0.1

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the read-only/idempotent annotations, the description discloses important behavior: total/unread counts are exact, scanned aggregations may be truncated, responses include scanned/truncated flags, and non-selectable namespace containers return an actionable error. This is exactly the kind of context an agent needs to invoke the tool correctly.

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 front-loaded with purpose, then moves efficiently through scan limits, partial-result detection, and error behavior. Every sentence contributes useful operational context without unnecessary wording.

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 read-only stats tool with no output schema, the description adequately covers the returned metrics, the scanLimit cap, partial-result signaling, and the namespace-container error case. Annotations and schema cover the remaining safety and parameter details.

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?

Schema coverage is 100%, so the schema already documents both parameters in detail. The description reinforces the default and maximum scanLimit and explains the partial-result flag, but adds little parameter meaning beyond what the schema provides.

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 states a specific verb and resource: return aggregate stats for a folder, including total/unread and scanned-envelope metrics. It is clear what the tool does, though it does not explicitly name or distinguish itself from siblings such as count_messages.

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?

Usage is implied by the listed metrics, and the description gives practical guidance on scanLimit defaults and caps. However, it does not explicitly say when to use this tool versus alternatives like count_messages or list_folders.

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