Skip to main content
Glama

Undo a change made from the inbox view

undo_view_action

Puts back every message one earlier change moved: an inbox-view change or a change from archive_messages, trash_messages and the other message tools (archive, trash, spam, star, label, unlabel, snooze), or confirm_mark_spam. Works once, for 7 days. Pass the undoId from that action; leave it out to undo the most recent change (only when the person asks to undo their last change).

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

Input Schema

NameRequiredDescriptionDefault
undoIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent, open-world behavior. The description adds crucial context beyond that: it works only once, only for 7 days, must target a specific earlier action via undoId, and has documented fallback behavior when no id is supplied. Nothing contradicts the annotations.

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?

Front-loads the core operation, then enumerates affected actions, then states the limits, then explains the parameter. Three tight sentences with no filler; every clause adds usable information.

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?

With no output schema but rich annotations, the description supplies everything an agent needs: scope, affected siblings, time window, one-time limitation, required vs omitted undoId behavior, and the human-intent caveat for the default case.

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?

Schema coverage is 0%, so the description must carry the load. It does: it explains what undoId is (the id from the action being undone), how to obtain it, and what happens when it is omitted. The optional parameter's operational meaning is fully clarified.

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-plus-resource: restores every message moved by one earlier change. It explicitly names the sibling actions whose changes can be undone (archive_messages, trash_messages, confirm_mark_spam, etc.), distinguishing it clearly from every other message tool.

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 explicit conditions: pass the undoId from the action to undo, or omit it to undo the most recent change only when the person asks to undo their last change. It also states the single-use and 7-day limits, so the agent knows when the tool will and will not work.

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