Skip to main content
Glama
Mail-MCP

Mail-MCP

by Rixtayz

Summary by sender

mail_senders_summary
Read-onlyIdempotent

Scans a mail folder (Inbox by default) and summarizes senders with message counts, unread totals, latest messages, and unsubscribe methods to prioritize inbox triage.

Instructions

KEY TOOL FOR TRIAGE. Scans a folder (Inbox by default, up to 50,000 messages) and aggregates messages by sender: count, unread, latest message, and for the top senders the unsubscribe method mail_unsubscribe would use: one-click, browser (a link to open), mailto (a link the user sends from their own mail app), blocked (nothing to open: a link to this computer or the local network, a sign of a suspicious message, or a plain http link with no email address to use instead) or none. A link's host name is only checked when mail_unsubscribe runs, so a one-click or browser sender can still turn out blocked then. Sorted by volume. partial: true means the folder holds more than 50,000 messages, so counts are lower bounds and some senders may be missing; pass since to scan a shorter period. The scan is cached for the session. Follow up with mail_unsubscribe(lastMessageId) and mail_bulk_by_sender(address).

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": "mail_senders_summary"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoNumber of senders to return (max 200)
sinceNoOnly count messages received since this date
folderNoFolder to analyse. Default: inbox

Output Schema

NameRequiredDescriptionDefault
partialYestrue when the folder holds more than 50,000 messages: only 50,000 were scanned
scannedYesMessages scanned (at most 50,000)
sendersYes
totalSendersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.2.2
    • addedOutput schema / properties / partial
      Added value: +{
      +  "description": "true when the folder holds more than 50,000 messages: only 50,000 were scanned",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / scanned / description
      Added value: +"Messages scanned (at most 50,000)"
    • addedOutput schema / properties / senders / items / properties / unsubscribe / properties / detail
      Added value: +{
      +  "description": "Why the link is blocked or not used",
      +  "type": "string"
      +}
    • addedOutput schema / properties / senders / items / properties / unsubscribe / properties / https / description
      Added value: +"The https link, only when it may be opened"
    • addedOutput schema / properties / senders / items / properties / unsubscribe / properties / method
      Added value: +{
      +  "description": "The method mail_unsubscribe would use. blocked = nothing to open: the link points to this computer or the local network, is plain http, or is not valid",
      +  "enum": [
      +    "one-click",
      +    "browser",
      +    "mailto",
      +    "blocked",
      +    "none"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / senders / items / properties / unsubscribe / required
      Previous value: -[
      -  "oneClick"
      -]New value: +[
      +  "method",
      +  "oneClick"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "scanned",
      -  "totalSenders",
      -  "senders"
      -]New value: +[
      +  "scanned",
      +  "totalSenders",
      +  "partial",
      +  "senders"
      +]
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered; the description adds genuinely new behavior: the 50,000-message scan cap, session-level caching, volume sorting, and `partial: true` semantics. The unsubscribe-method taxonomy and the caveat that link hosts are only validated when mail_unsubscribe runs are valuable edge-case disclosures. It stops short of describing result shape for a single sender or how caching invalidates, so not a full 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?

The strongest information — triage framing and the aggregation output — is front-loaded, and there is no filler. The parenthetical explanation of 'blocked' is dense but earns its place by disambiguating a non-obvious enum-like value.

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?

An output schema exists, so return values need not be spelled out, yet the description still explains the one field agents must interpret (`partial`) and the caching behavior that affects repeated calls. For a three-optional-parameter read tool with full annotation coverage, nothing essential to a correct call is missing.

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%, so the baseline is 3, but the description adds real meaning beyond it: `top` determines which senders get the unsubscribe-method breakdown, and `since` is the mitigation for oversized folders rather than just a filter. It also states the default folder is Inbox, reinforcing the schema default.

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 opens with a specific verb and resource — scans a folder and aggregates messages by sender — and enumerates the exact outputs (count, unread, latest message, unsubscribe method). It is clearly distinct from siblings such as mail_bulk_by_sender and mail_unsubscribe, which are positioned as follow-ups rather than substitutes.

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

Usage Guidelines5/5

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

It frames itself as the triage entry point and then routes the agent forward explicitly: 'Follow up with mail_unsubscribe(lastMessageId) and mail_bulk_by_sender(address)'. It also gives a concrete recovery path when results are incomplete ('pass `since` to scan a shorter period'), which is when-to-use guidance for a second invocation.

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