Skip to main content
Glama
gmail-mcp

gmail-mcp

trash_emails

CHOICE HINT: When the user asks to "trash" or "delete" multiple emails, ALWAYS prefer this tool over making N calls to trash_email(). It uses Gmail's batchModify API in chunks of at most 1000 message IDs.

Instructions

CHOICE HINT: When the user asks to "trash" or "delete" multiple emails,
ALWAYS prefer this tool over making N calls to trash_email(). It uses
Gmail's batchModify API in chunks of at most 1000 message IDs.

Move multiple emails to trash in a single MCP request.

Uses messages().batchModify() with up to 1000 IDs per Gmail API call.

Required:
  message_ids (list[str]) — Gmail message IDs.

Returns on success:
  {"ok": true, "data": {
    "requested": N, "succeeded": N, "failed": 0,
    "results": [{"id": "...", "ok": true}, ...]
  }}

Workflow note: Use this instead of N trash_email() calls.

Input Schema

NameRequiredDescriptionDefault
message_idsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the underlying batchModify API, the 1000-ID chunking behavior, and the per-ID success/failure result shape, which tells the agent partial failures are possible. It omits whether trashing is reversible or what permissions are required, so it falls short of full disclosure.

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

Conciseness3/5

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

The routing hint is correctly front-loaded, but the content is redundant: the batch-vs-single-call point appears in the CHOICE HINT, the summary line, and again in the workflow note. The 1000-ID limit is likewise stated twice. Trimming one repetition would make it tight.

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?

Although no output schema exists, the description supplies the return envelope with requested/succeeded/failed counts and a results array, which is the key information for a batch operation. Only edge cases — reversibility, handling of IDs already in trash, oversized inputs — are left unstated.

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 0%, so the description must compensate, and it only restates the parameter as "message_ids (list[str]) — Gmail message IDs," which is already evident from the schema's array-of-strings definition. It adds no format details (e.g., whether IDs must be numeric strings, max list size, behavior on unknown IDs), so it sits at the minimum-viable level.

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 — "Move multiple emails to trash in a single MCP request" — and immediately distinguishes it from the singular sibling trash_email(). An agent can select it without opening the 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?

The CHOICE HINT explicitly names the trigger (user asks to trash/delete multiple emails) and the alternative to avoid (N calls to trash_email()), and the workflow note repeats the routing rule. This is exactly the when-to-use guidance the dimension asks for.

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