Skip to main content
Glama

Move messages to Trash

trash_messages
Destructive

Moves the person's messages to Trash. Prefer archive_messages unless the person asked to trash. Messages the person picked: pass each row's inboxId and messageId from show_inbox (the id block at the end of its text, or structuredContent.rows), usually by row number ("archive 2 and 5"). Or pass sender { inboxId, email } to act on that sender's mail still in the inbox, like "archive everything from 2" after review_unsubscribes (up to 50 newest per call). Trashing by sender skips mail from people; trash those one message at a time, by name. Never trash mail from a person unasked. For more than 5 messages, a call without confirmed:true changes nothing and returns { needsConfirmation: true, count, bySender, sayToHuman }: show sayToHuman, then call again with the same items/sender and confirmed:true once the human agrees. More than 25 messages is a preview first: nothing moves and you get { preview: true, count, topSenders, samples, confirmToken }; ask the person, then call again with the same arguments plus confirmToken. Past 500 messages moved in an hour the person is asked directly, or you get { needsApproval: true, approvalUrl }: give them the link and do not split the move into smaller calls. Mail from a VIP is skipped when you act on several messages. Act on a VIP's message alone, and only after the person agrees: in apps that can prompt the person, they are asked directly; otherwise ask in chat and pass vipConfirmed:true. Reporting spam is not done here: it goes through propose_mark_spam then confirm_mark_spam, one message at a time. Work on your own only on a clear instruction or a saved agentRules rule; otherwise suggest and wait. The result has an undoId for undo_view_action, which works once, for 7 days; report counts and the undoId.

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

Input Schema

NameRequiredDescriptionDefault
itemsNo
senderNoInstead of items: every message from this sender still in the inbox
confirmedNoMore than 5 messages: true once the person agreed to the count/sender breakdown a first call without it returned. Not needed for 5 or fewer.
confirmTokenNoMore than 25 messages: the confirmToken a first call returned in its preview, after the person agreed. Single use, 15 minutes.
vipConfirmedNotrue only after the person agreed in chat to act on this one VIP message

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/openWorldHint annotations by disclosing the full escalation ladder: >5 messages requires confirmed:true, >25 requires a preview confirmToken (single use, 15 minutes), >500/hour triggers needsApproval with an approvalUrl. It also discloses VIP skipping behavior, that trashing by sender silently excludes mail from people, and that the undoId is single-use and valid 7 days.

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 purpose and the archive-vs-trash decision, then layered confirmation rules — a sensible ordering. It is dense and long, with mild redundancy between "Never trash mail from a person unasked" and the final "work on your own only on a clear instruction" clause, so not maximally tight.

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?

For a destructive, open-world, multi-tier-confirmation mutation with no output schema, the description supplies everything needed: argument sourcing, escalation thresholds, VIP and person-mail edge cases, approval-link handling, and the shape of each early-return response including sayToHuman reporting. Nothing material is left for the agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds real meaning beyond the schema: it explains where items come from (show_inbox's id block or structuredContent.rows, addressable by row number), what sender means semantically (that sender's mail still in the inbox, up to 50 newest), and precisely when confirmed/confirmToken/vipConfirmed are required and in what sequence. This is more than the 80% schema coverage already provides.

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 ("Moves the person's messages to Trash") and immediately contrasts with archive_messages, which is the closest sibling. An agent can distinguish it from archive_messages, label_messages, and the propose_mark_spam/confirm_mark_spam pair without opening any 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 rule ("Prefer archive_messages unless the person asked to trash") plus a hard exclusion ("Reporting spam is not done here: it goes through propose_mark_spam then confirm_mark_spam"), and a governing policy ("Work on your own only on a clear instruction or a saved agentRules rule; otherwise suggest and wait"). Each alternative sibling is named with the condition that selects it.

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