Skip to main content
Glama

Mail: Get cleanup summary

mail_get_cleanup_summary
Read-only

Who is filling the mailbox — the preview step before any mass delete. Groups messages by sender (count, unread, oldest, newest, which folders, what the classifier called them), and reports totals per folder, per category and per age bucket. Accepts the same filters as mail_delete_by_filter, so you can narrow here, read the counts, and pass the identical filters to the delete. Changes nothing.

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

Input Schema

NameRequiredDescriptionDefault
topNo
folderNo
mailboxNo
categoryNo
date_afterNoYYYY-MM-DD
date_beforeNoYYYY-MM-DD
from_addressNo
subject_containsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the closing 'Changes nothing' confirms rather than contradicts them. Since no output schema exists, the description earns credit for enumerating the returned breakdowns, though it says nothing about how the `top` cap affects results or about pagination/truncation of the sender list.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the question the tool answers and the fact that it precedes deletion. Every clause carries information; nothing is 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?

For an 8-parameter read-only aggregate tool with no output schema, the description covers purpose, return shape and the delete-partner workflow well. The remaining gap is parameter-level detail for the less obvious inputs, which the sparse schema does not fill in.

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 description coverage is only 25% across 8 parameters, so the description needs to compensate more than it does. It signals that folder, category and date filters exist via the grouping dimensions and the 'same filters as mail_delete_by_filter' pointer, but never explains `top`, `mailbox`, `from_address`, or `subject_contains` semantics.

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?

Specific verb-like framing plus exact output content: it groups messages by sender with count, unread, oldest, newest, folders and classification, and reports totals per folder, category and age bucket. It also names its sibling mail_delete_by_filter as the pairing tool, so an agent can tell the two apart without opening either schema.

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?

States the intended workflow explicitly: narrow with filters here, read the counts, then pass identical filters to mail_delete_by_filter. That gives both when-to-use and the named alternative with the condition that selects it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources