Skip to main content
Glama

pg_undo_turn

Create a manual pre-edit snapshot or restore a Git slot or non-Git folder to its baseline, so you can undo a change and return the workspace to a known state.

Instructions

Create a manual pre-edit snapshot or one-click restore a Git slot or non-Git folder back to its pre-unlock/baseline snapshot.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "op": "<op>",
      "project": "<project>"
    },
    "name": "pg_undo_turn"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes
projectYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.1

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It hints that a restore returns to a 'pre-unlock/baseline' state, but never says whether the undo discards current uncommitted work, whether snapshots persist across sessions, whether the operation is reversible, or what permissions the project requires. For a tool that can overwrite working state, the destructive consequences are left entirely implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single sentence with no filler, but it is structured as an OR of two unrelated operations, so the most decision-relevant information (which mode does what) is buried rather than front-loaded. Splitting into two short sentences keyed to the `op` values would cost nothing and clarify far more.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a state-mutating tool with a destructive restore path, zero annotations, no output schema, and two undocumented parameters. Given that complexity, the description should explain the two modes, the effect of each on existing work, and what `project` refers to; it does none of these.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate, and it largely does not. It never states which `op` value triggers the snapshot versus the restore, and `project` is undocumented — it could be a name, an ID, or a path. Only an implicit ordering hint connects the prose to the enum.

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

Purpose3/5

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

The description names two distinct verbs (create a snapshot, restore back to a snapshot) against specific resources (Git slot, non-Git folder), which is more than a tautology. However it collapses both operations into one dense sentence without tying them to the `op` enum values, and the name 'undo_turn' suggests only the restore half. An agent must infer that 'snapshot' and 'undo' map to the two clauses in the order written.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no statement of when NOT to use it, and no reference to any sibling despite several plausibly overlapping ones (pg_checkpoint, pg_slot_close, pg_slot_open). The word 'manual' hints at a deliberate pre-edit action, but nothing tells the agent when this is preferable to checkpointing or closing a slot.

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