Skip to main content
Glama

mail_duplicates

Read-only

Reports where Mail stores redundant copies of the same message, showing mailbox counts, worst duplicates, and cross-account overlap so you can identify cleanup targets. Read-only.

Instructions

Where Mail is storing redundant copies of the same message — a REPORT, read-only.

Mail accumulates duplicate rows (a UI drag copies rather than moves, Gmail shows one message under a label and All Mail, migrations leave copies on two accounts). The read tools already hide them — mail_search/mail_thread/mail_overview report result per Message-ID — so this exists to show what is still physically there. Returns {redundant, mailboxes, worst, cross_account, note}: mailboxes is {mailbox_url, total, distinct_, redundant} per mailbox worst-first, worst names individual messages with the most copies ({mailbox_url, id, subject, copies}), and cross_account counts rows whose Message-ID also exists under another account. This tool CANNOT delete anything. Cleaning up is macos-apps-mcp dedupe-mail, run a terminal by the user — thousands of deletes is a job a human starts, not a tool call. Tell them that command rather than proposing per-message deletes. Fast and read-only, straight from Mail's index at rest (so it may lag Mail by a few minutes and never launches Mail). Needs Full Disk Access.

Input Schema

NameRequiredDescriptionDefault
limitNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.15.1

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial context beyond the readOnly/destructive annotations: index freshness lag, no Mail launch, Full Disk Access requirement, cross-account counting, output shape, and the inability to delete. These details materially affect correct invocation and user guidance.

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 opening sentence front-loads the purpose and read-only nature, and most follow-up detail is useful. It is somewhat long and repeats read-only information already in annotations, but the density is justified for a report tool with cleanup guidance.

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?

Complete for this tool: it covers purpose, output fields, read-only behavior, freshness, permissions, cross-account semantics, and the correct cleanup path. The output schema exists, but the prose still gives enough context for an agent to use and explain the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single optional `limit` parameter has 0% schema description coverage and is never mentioned in the description. It is unclear whether `limit` caps mailboxes, worst-message entries, or rows, so the description does not compensate for the missing schema documentation.

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?

States a specific resource and report action: it shows where Mail physically stores redundant duplicate copies. It also explicitly distinguishes this report from read tools like mail_search/mail_thread/mail_overview, which already hide duplicates.

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?

Explains exactly when to use it: when the agent needs to see remaining physical duplicates that normal read tools hide. It also states what not to do by clarifying this tool cannot delete and directing cleanup to the external dedupe-mail command.

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