Skip to main content
Glama

Recover an email from the bin

untrash_email
Idempotent

Restore a deleted email from the Gmail bin and reapply its original labels. Act before Gmail permanently deletes it after about 30 days.

Instructions

Take a message back out of the bin and restore the labels it had. Only works while the message is still there — once Gmail has emptied the bin, after about 30 days, there is nothing left to recover. Use search_emails with "in:trash" to find what is in there.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesConfigured account: the email address, or the alias given at setup.
message_idYesMessage to take out of the bin.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

The description adds behavioral context beyond the annotations: it restores prior labels and has a 30-day recovery window. It does not describe failure modes or authorization requirements, but the annotations already signal mutation and idempotency, and nothing contradicts the structured metadata.

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?

Three tight sentences deliver purpose, limitation, and the discovery alternative in order. Every sentence earns its place and the most important information is front-loaded.

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 a two-parameter recovery tool, this description is nearly complete: what it does, when it works, and how to find eligible messages are all present. The only missing piece is the response format, but with no output schema and a side-effect-driven operation, this is a minor gap.

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 100%, and both account and message_id have meaningful schema descriptions. The tool description does not add extra format or syntax guidance for the parameters, so the baseline of 3 is appropriate.

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?

Description opens with a concrete action, 'Take a message back out of the bin and restore the labels it had,' specifying both the resource (trashed email) and the expected effect. This clearly distinguishes untrash_email from trash_email and search_emails.

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 a hard precondition: only works while the message is still in the bin, with a 30-day Gmail expiration limit. It also explicitly directs the agent to search_emails with 'in:trash' to find recoverable messages, giving a clear when-to-use and when-to-look-elsewhere guideline.

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