Skip to main content
Glama

Restore a thread from the trash

threads_untrash
Destructive

Bring one thread, or one message of it, back out of the trash. An Outlook mailbox and a mailbox whose provider is imap put a draft back in its drafts, the owner's own mail in sent mail and the rest in the inbox - a Gmail one with every label it carried, each message keeping its id, any other imap one each under a new id the answer names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe threadId a search or a read answered, or with scope message the message's id.
scopeNothread, the default, acts on the whole thread; message acts on that one message alone.
mailboxYesThe mailbox's name or its email address.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
labelIdsYes
messagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations, it discloses substantial behavioral detail: provider-specific landing locations (Outlook/imap drafts→Drafts, sent→Sent, otherwise Inbox), Gmail label preservation, and that some imap messages come back under a new id. It does not address permissions or rate limits, but the provider-dependent outcome is exactly the kind of context an agent cannot get elsewhere.

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?

Purpose is front-loaded in the first clause and the second sentence is dense with genuinely useful provider behavior. It is one long, slightly overstuffed sentence, but every phrase carries information rather than padding.

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?

With an output schema present, return values need not be explained, yet the description still notes that the answer names new ids. Combined with annotations covering the safety profile and a 100%-covered schema, the definition is complete enough to invoke correctly, with only permission/prerequisite context missing.

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%, so mailbox, id and scope are fully documented in the schema itself. The description adds no syntax or format detail for the parameters beyond echoing the thread-vs-message distinction already in the scope enum description.

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 ('bring ... back out of the trash') and explicitly bounds scope to 'one thread, or one message of it', which maps directly onto the scope parameter. Together with the sibling threads_trash, an agent can immediately tell this is the inverse operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The inverse relationship to threads_trash is implied by 'back out of the trash', so usage is inferrable, but the description never states when to pick this over alternatives or that the thread/message must currently be in trash. No explicit when-not guidance.

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