Skip to main content
Glama
mail-mcp-server

mail-mcp-server

sender_stats

Identify top email senders in a mailbox over a chosen time window, see each sender's unsubscribe method, and report how many messages were counted.

Instructions

Top senders by message count over a time window, each with how it can be unsubscribed from (one-click, mailto, link-only, none). Reports how many messages it counted. Gmail allows about 300 messages a minute per mailbox, so a month of a busy mailbox takes several minutes; tell the user before starting a long window.

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": {
      "mailbox": "<mailbox>",
      "window": "<window>"
    },
    "name": "sender_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoSenders to return, default 25
queryNoOptional extra Gmail search, e.g. "category:promotions"
windowYesGmail newer_than value: 30d, 6m, 1y
mailboxYesA connected mailbox address (see list_mailboxes)
max_messagesNoMessages to count, default 5000, at most 20000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does reasonably well: it discloses the Gmail throughput limit (~300 messages/minute), warns that a month window takes several minutes, and pre-announces that the response reports how many messages were counted. It does not state that the operation is read-only or what happens when max_messages caps the scan, which keeps it short of a 5.

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?

Front-loaded with the result shape, then the runtime caveat—no filler sentences. The second sentence is long and compound (rate limit plus user-communication instruction), but every clause carries information.

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

Completeness3/5

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

For a 5-parameter tool with no annotations and no output schema, the description covers the return shape at a high level (senders plus unsubscribe method plus counted total) and the main runtime risk. It omits what happens when max_messages truncates the scan and gives no indication of ordering or tie-breaking for 'top'.

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%, including what window, mailbox, top, query and max_messages mean, so the schema does the heavy lifting. The description only indirectly adds meaning by tying long windows to multi-minute runtime; it adds no syntax or format detail beyond the schema.

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 names a specific aggregation ('Top senders by message count over a time window') and the shape of each result (unsubscribe capability: one-click, mailto, link-only, none). It is clearly distinguishable from sibling tools like search or mailbox_overview, though it never explicitly contrasts itself with them.

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?

It gives operational guidance ('tell the user before starting a long window') but no explicit when-to-use/when-not guidance relative to alternatives such as search or plan_unsubscribe. The usage context (bulk sender analysis) is implied rather than stated.

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