Skip to main content
Glama

get_undo_state

Read-onlyIdempotent

Retrieve undo/redo counts, next entry labels, and transaction open status in one call before reverting or restoring edits. Avoid chaining checks and learn if a transaction is silently swallowing later edits.

Instructions

One call that answers everything you need before touching undo/redo: both counts, both next-entry LABELS, and whether a transaction is still OPEN (transaction_open -- the thing that silently swallows later edits into someone else's batch). Read this instead of chaining can_undo + can_redo, and read it BEFORE undo/undo_multiple so you know what you are about to revert.

Returns: { can_undo, can_redo, undo_count (entries undo can still revert), redo_count (undone entries redo can restore), next_undo, next_redo, transaction_open, transaction_index }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower. The description adds real semantic context the annotations cannot: what transaction_open means (an open transaction that 'silently swallows later edits') and the labels returned. It stops short of describing response shape nuances but adds meaningful behavioral insight beyond structured data.

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 payoff ('One call that answers everything...') before the details, and organized into purpose, alternative, and returns. The parenthetical aside on transaction_open is slightly chatty but earns its place by explaining a non-obvious field.

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?

No output schema exists, so the description carries the burden of explaining return values, and it does so thoroughly — enumerating all eight fields with brief meanings (undo_count, redo_count, next_undo, next_redo, transaction_open, transaction_index). An agent has everything needed to call and interpret this tool.

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

Parameters4/5

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

Zero parameters, so there is nothing to document and the baseline is 4. The description's value instead goes into the return fields, which the empty schema cannot express.

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+resource (get the undo/redo state) and immediately distinguishes itself from siblings by positioning as a single call replacing can_undo + can_redo. An agent can tell exactly what this returns versus what undo/undo_multiple do.

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 alternatives ('read this instead of chaining can_undo + can_redo') and the ordering condition ('read it BEFORE undo/undo_multiple so you know what you are about to revert'). Both when-to-use and the alternative are stated, nothing left to inference.

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