Skip to main content
Glama

cutbolt_session_undo

Idempotent

Undo the latest applied change in a saved session, creating a new revision that preserves history. Repeat to step back through revisions.

Instructions

Undo the latest applied state as a new revision, preserving history. Repeated undo walks backward. Retry with identical request_id/expected_revision.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesID of a project saved in store_root.
request_idYesCaller-chosen ID for this change, 1-128 bytes, unique within the project. Resend identical arguments with it to retry safely.
store_rootNoExisting local directory holding the session database (projects.sqlite3)
expected_revisionYesHead revision this change was prepared against; a different head fails with REVISION_CONFLICT.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds substance beyond that: history is preserved by writing a new revision, repeated calls step further back, and retries require identical request_id/expected_revision. It omits what failure looks like when there is no state left to undo.

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?

Three short sentences, front-loaded with the action and mechanism, then the repeat semantics, then retry. Nothing is padded or restated.

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?

For a stateful undo with idempotency annotations and fully documented parameters (including the REVISION_CONFLICT condition on expected_revision), the description covers what the agent needs to call it correctly. Edge cases such as undo at revision 0 or behavior with a stale store_root are left unaddressed.

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?

Schema coverage is 100%, so the baseline is 3, and the description earns slightly more by pairing request_id with expected_revision as the retry tuple — a cross-parameter relationship neither field documents on its own. It adds no format or range detail beyond that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb (undo) and resource (the latest applied state) and clarifies the mechanism: it writes a new revision rather than deleting history, which sets it apart from a plain rollback and from cutbolt_session_apply. It never names a sibling tool outright, so an agent must infer the boundary with apply/history on its own.

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

Usage Guidelines4/5

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

It states the repeat-to-walk-backward pattern and the retry condition, which is real operational guidance an agent would not otherwise have. It stops short of naming when not to use it (e.g. nothing to undo) or pointing to an alternative tool, so it is context-rich but not fully specifying.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.