Skip to main content
Glama

Summarize Email Senders

summarize_senders
Read-only

Counts a folder's messages by sender without listing them, returning frequency, unread and date summaries to identify high-volume senders for inbox cleanup.

Instructions

Count a folder's messages by sender, server-side, without listing them. Returns one row per sender (count, unread, first and last date, address, name, latest subject), most frequent first — the starting point for cleaning a large inbox: newsletters, promotions and notifications show up as a few hundred senders repeating.

Reads every matching message in the folder (paged internally, up to ~50,000) so the counts are complete; only the summary is returned. Narrow with filter (OData, e.g. a receivedDateTime range) when only part of a folder matters. Use group_by: domain to see families of senders, then group_by: address to get the addresses move_messages_matching needs.

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

Input Schema

NameRequiredDescriptionDefault
topNoHow many senders to show (default 100, max 1000)
filterNoOptional OData filter to narrow the set, e.g. "receivedDateTime lt 2025-01-01T00:00:00Z"
folderNoFolder to summarise: well-known name (inbox, archive), display name, or ID. Default: inbox
mailboxNoEmail address of another mailbox to act on (delegated or shared), e.g. 'someone@example.com'. Omit for your own mailbox; required when this server signs in as an application. Only addresses this server is configured to allow will be accepted.
group_byNoGroup by full sender address (default) or by the domain after the @

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered; the description adds real behavioral context beyond that — it reads every matching message with internal paging up to ~50,000 and returns only the summary, which warns the agent about cost and latency on large folders. It does not discuss permissions or failure modes, keeping 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.

Conciseness5/5

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

Front-loaded with the core action and return shape, then cost disclosure, then narrowing and grouping guidance. Dense but every sentence carries distinct information; no restatement of the name or title.

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?

No output schema exists, yet the description fully specifies the returned columns and ordering ('most frequent first'), plus scale limits and the grouping workflow. For a 5-parameter, all-optional read tool, nothing an agent needs to invoke it correctly 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; the description still adds meaning by giving an OData filter example, explaining the domain-vs-address grouping tradeoff, and tying group_by: address to a downstream tool's input. It adds workflow semantics the schema's terse property descriptions do not.

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 verb and resource ('Count a folder's messages by sender, server-side, without listing them') and immediately distinguishes itself from a listing tool. It also enumerates the returned row shape (count, unread, first/last date, address, name, latest subject), so an agent knows exactly what it gets.

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?

Gives an explicit use case ('the starting point for cleaning a large inbox'), a narrowing condition ('Narrow with filter ... when only part of a folder matters'), and a concrete chained workflow: group_by: domain first, then group_by: address to feed move_messages_matching. That is when-to-use plus a named downstream alternative.

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

Deploy Server

Other Tools