Skip to main content
Glama

undo

Restore every file changed by an applied plan to its original location, reversing the rename-and-sort operation so the folder returns to its prior state.

Instructions

Put every file from an applied plan back where it was.

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": {
      "plan_id": "<plan_id>"
    },
    "name": "undo"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_idYes

Output Schema

NameRequiredDescriptionDefault
movesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • removedOutput schema / $defs / Move / properties / destination / format
      Removed value: -"path"
    • removedOutput schema / $defs / Move / properties / source / format
      Removed value: -"path"
  2. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the safety profile is covered and the description only needs to add context. It adds scope ('every file') and the restoring semantics, but says nothing about files modified or moved since the apply, partial failure behavior, or whether the undo itself can be undone — meaningful gaps for a rollback operation.

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?

One sentence, front-loaded with the effect and scoped to the whole plan. There is no filler and no redundancy, and it reads cleanly at a glance.

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

Completeness3/5

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

An output schema exists, so return values need not be explained. However, for a mutation tool that reverses prior work with a single undocumented identifier parameter, the definition leaves out prerequisites and failure behavior that an agent would want before invoking it.

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?

With a single parameter at 0% schema description coverage, the description must carry the load. It adds real meaning by tying plan_id to a plan that has already been applied, which the bare string type does not convey, but it gives no format, source, or constraints for that identifier.

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 states a concrete operation on a concrete resource: restoring every file from an applied plan to its original location. That is unambiguous and clearly distinct from apply_plan or plan_tidy, but it never names those siblings, so the differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

Usage is only implied by the phrase 'from an applied plan' — the agent can infer this is the rollback step after apply_plan. There is no explicit when-to-use, no statement of prerequisites (must the plan have been applied already?), and no mention of what to do if only part of the plan was applied.

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