Skip to main content
Glama

Gmail Delete

gmail_delete
DestructiveIdempotent

Delete Gmail messages or entire conversations by moving them to Trash by default, or permanently remove them with an explicit permanent mode when needed.

Instructions

Delete Gmail messages or one whole conversation: move them to Trash (default) or, with mode 'permanent', delete them for good. Prefer Trash, which gmail_modify_messages with untrash=true can undo; to only hide mail from the inbox, archive it with gmail_modify_messages instead. Returns status 'ok', mode, message_ids or thread_id and processed, or status 'cancelled' if the user declines. Permanent deletion, and trashing 10 or more messages, asks the user to confirm first; permanent deletion cannot be undone. Trashing several messages goes one by one, so a failure part-way leaves the earlier ones in Trash.

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

Input Schema

NameRequiredDescriptionDefault
modeNo'trash' (default) moves the mail to Trash, reversible with gmail_modify_messages untrash=true until Gmail empties Trash after 30 days; 'permanent' deletes it for good after the user confirms.trash
dry_runNoTrue previews the call instead of running it: nothing is sent to Google and the user is not asked. Returns status 'dry_run', preview, action, count (distinct message IDs; null for a thread_id), requested_count (IDs as given) and consent_required: whether the real call would ask the user to confirm.
thread_idNoGmail thread ID: every message of that conversation is deleted; give message_ids or thread_id, not both.
message_idsNoGmail message IDs to delete, 1 to 1,000; give message_ids or thread_id, not both.

Output Schema

NameRequiredDescriptionDefault
modeNo
statusNoMachine-readable operation status.
processedNo
thread_idNo
message_idsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description goes well beyond them: it discloses that permanent deletion and trashing 10+ messages trigger a user confirmation, that permanent deletion cannot be undone, and that multi-message trashing runs sequentially so a partial failure leaves earlier messages trashed. It also documents the 'cancelled' outcome when the user declines, which no annotation conveys.

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?

Front-loaded with the action and default, then alternatives, then return/caveat details, so an agent can stop reading early. Every sentence carries operational weight, though the enumerated return values ('status ok, mode, message_ids or thread_id and processed') partly duplicate the output schema and could be trimmed.

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?

Covers the decision points that matter for a destructive tool: default mode, undo path, archive alternative, confirmation triggers, irreversibility, partial-failure risk, and dry-run/cancelled outcomes. An agent has everything needed to choose mode and warn the user correctly without consulting other sources.

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, but the description adds semantics the schema does not: the volume threshold at which trashing triggers a confirmation (10 or more) and the preference ordering between 'trash' and 'permanent'. The message_ids/thread_id exclusivity and dry_run preview fields are already spelled out in the schema, so those add no incremental value.

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 ("Delete Gmail messages or one whole conversation") and immediately distinguishes the two scopes, messages vs. a full thread. It also names the sibling used for a different intent ("to only hide mail from the inbox, archive it with gmail_modify_messages instead"), so an agent can separate it from gmail_modify_messages 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?

Gives an explicit default ("Trash (default)"), a stated preference with reasoning ("Prefer Trash, which gmail_modify_messages with untrash=true can undo"), and a concrete redirect for the archive use case to a named sibling. When-not guidance is also present via the irreversibility warning on 'permanent'.

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