Skip to main content
Glama
sethbang

proton-mail-mcp

top_senders

Read-onlyIdempotent

Generate a frequency table of top email senders in a folder, sorted by message count. Filter by date range and optionally exclude your own address.

Instructions

Return a frequency table of top senders for a folder, optionally filtered by date range. Buckets are keyed by lowercased email address. Default limit 20, scanLimit 5000 (max 20000). Each row carries a direction of "self" or "received" so callers can distinguish messages from the authenticated user (typical when scanning "All Mail", which spans Sent). v1.0.0 default change: excludeSelf now defaults to true — set it to false to include the user's own outgoing mail in the table. Response also includes scanned/truncated indicators.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoFolder to analyze (default: INBOX). Note: scanning `All Mail` includes Sent, so your own address can appear unless excludeSelf stays true.INBOX
sinceNoOnly count messages on or after this date (`YYYY-MM-DD`, inclusive). Omit for no lower bound.
beforeNoOnly count messages strictly before this date (`YYYY-MM-DD`, exclusive). Omit for no upper bound.
limitNoMax number of sender rows to return, 1–200 (default: 20). Rows are sorted by message count, descending.
scanLimitNoMax envelopes to scan when building the table, 1–20000 (default: 5000). The response reports if it was truncated; raise for large folders.
excludeSelfNoDrop rows whose address matches PROTONMAIL_USERNAME. Defaults to true (changed in v1.0.0). Set false to include your own outgoing address (e.g. when analyzing Sent or All Mail).
Behavior5/5

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

Annotations already declare readOnlyHint and idempotentHint. The description adds substantial behavioral context: lowercased email keys, direction field ('self'/'received'), scanning limits (default 5000, max 20000), and the excludeSelf default change (v1.0.0). It also explains response indicators (scanned/truncated). No contradiction with annotations.

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 detailed but reasonably concise, with key information upfront. However, the versioning note about v1.0.0 could be integrated more smoothly. Still, every sentence adds value, and the structure is logical.

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 no output schema, the description explains response structure (direction, scanned/truncated). It covers all parameters and behavioral nuances. With 6 parameters and no required ones, it's fairly complete. Minor gaps: could mention default folder (INBOX) is already in schema.

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?

Schema coverage is 100% (all 6 parameters have descriptions). The description adds extra meaning: folder note about All Mail including Sent, since/before date formats (inclusive/exclusive), limit/scanLimit ranges, and excludeSelf default change. This goes beyond the schema, justifying a score above baseline 3.

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's purpose: 'Return a frequency table of top senders for a folder, optionally filtered by date range.' It uses a specific verb ('Return') and resource ('frequency table of top senders'), distinguishing it from siblings like folder_stats, count_messages, or search_messages, which have different outputs.

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 implicitly tells when to use (when needing top senders frequency) and mentions key behavior changes (excludeSelf default). However, it does not explicitly state when not to use or compare to alternative tools. The context is clear, but exclusion guidance is missing.

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/sethbang/proton-mail-mcp'

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