Skip to main content
Glama

gmail_undo

Revert the last Gmail action, including recalling a send while Undo is available, by tapping Undo or applying the opposite action.

Instructions

Undo the last Gmail action: tap 'Undo' on its snackbar if still shown, else revert it.

After gmail.send / reply / forward / send_draft it recalls the mail while Gmail still shows 'Undo' (about 7 s after 'Sent'; the send result's undo_available says whether it still did): undone='send' only when the message is back in Drafts and not in Outbox / Sent. Later it fails (not_found, the mail was sent). To be sure to recall a send, use gmail.send undo=true.

Reverting runs the opposite action on the same conversations (found again by subject): archive/trash/spam -> back to the Inbox, star <-> unstar, read <-> unread, label add <-> remove, mute -> unmute, snooze -> unsnooze, move -> move back (when it was done from a folder list).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_age_sNoOnly revert a recorded action at most this many seconds old.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so: it discloses the ~7 s snackbar window, the undo_available signal on send results, the meaning of undone='send', the not_found failure mode, and a mapping of which actions are reversible and to what they revert. An agent knows exactly what gets changed and when it will fail.

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 core action and mechanism, and the reversible-action list is compact. It is somewhat dense with parenthetical detail and could be trimmed slightly, but nearly every sentence adds operational value.

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 annotations and no output schema, the description covers the behavior, timing window, success/failure signals, alternatives, and the full set of reversible actions. Nothing an agent needs to invoke it correctly is 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% and max_age_s is already documented in the schema as a seconds-based age limit. The description adds useful timing context (7 s snackbar, recorded action age) but does not define max_age_s or its relationship to the hard 7 s window beyond implication. Baseline 3 is appropriate when the schema does the parameter-level work.

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 ('Undo the last Gmail action') plus the mechanism ('tap Undo on its snackbar ... else revert it'). It clearly distinguishes itself from sibling operations like gmail_restore, gmail_unsnooze, and gmail_unstar, which are single-purpose reverters, by naming the combined snackbar-revert behavior.

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?

Explicitly names the triggering tools (gmail.send / reply / forward / send_draft) and the condition (about 7 s after 'Sent', while undo_available says it is still shown). It also gives an alternative for guaranteed recall ('use gmail.send undo=true') and states what happens later ('it fails (not_found, the mail was sent)').

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