Skip to main content
Glama
shanghaitech-mail-mcp

shanghaitech-mail-mcp

邮箱清理体检(按发件人聚合)

mail_cleanup_report

Scan recent emails and group them by sender to show which addresses send bulk notifications or subscriptions versus real mail, supporting safe, read-only cleanup decisions.

Instructions

扫描文件夹里最近 N 封邮件,按发件人地址聚合成「谁发得最多」的清单,附带每组的未读数、最早/最晚时间、若干封 uid 与主题样例,用来判断哪些是群发通知/订阅资讯(可批量清)、哪些是真人邮件(别删)。纯只读,不删任何东西。

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_cleanup_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNo返回多少个发件人分组,默认 15
scanNo扫描最近多少封,默认 300
folderNo文件夹,默认 INBOX
unread_onlyNo只统计未读邮件

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/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 full burden and does well: it explicitly declares the operation is 纯只读 and deletes nothing, and it enumerates what each group contains (unread count, earliest/latest timestamps, sample uids and subjects). Gaps remain around cost/latency of scanning up to 2000 messages and behavior on empty folders.

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 action and scope are front-loaded in one dense sentence, followed by a short safety clause. The single sentence is long but every clause adds information about the returned payload; no filler.

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?

There is no output schema, and the description compensates by describing the report's fields and purpose, which is the main thing an agent needs to interpret results. Only minor items (cost of large scans, handling of an empty or nonexistent folder) are missing.

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 all four parameters (top, scan, folder, unread_only) already carry descriptions, ranges, and defaults. The prose only echoes '最近 N 封' and the grouping concept, adding no syntax or semantics beyond the schema; baseline 3 is appropriate.

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?

States a specific verb chain (扫描 recent N emails, 按发件人地址聚合) and the resource (mail grouped by sender), plus the decision it supports: which senders are bulk notifications vs. real people. It implicitly sets itself apart from the destructive siblings (mail_autoclean, mail_delete) by being a read-only diagnostic, but it never names an alternative tool explicitly.

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 use case is clear: run this before bulk cleanup to decide which senders are safe to purge. It conveys when-to-use (triage prior to deletion) but gives no explicit 'do not use for X' exclusions and does not name the sibling tools it complements.

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