Skip to main content
Glama

undo_edits

Destructive

Revert a draft to before its last committed edit batch, restoring up to ten undo steps when a revision is current; fails if the revision is stale or no undo remains.

Instructions

Revert a draft to before its last committed batch from edit_parts, edit_connections, route_connections, repair_vehicle or apply_vehicle_assembly. Keeps up to ten batches; there is no redo. Fails when the revision is stale or nothing is left to undo. Returns the new revision and the number of undo steps remaining.

Input Schema

NameRequiredDescriptionDefault
designYesStored draft name (from import_vehicle, create_land_vehicle, store_design or save_hull; see list_designs).
revisionYesThe draft's current revision from query_parts or query_connections; a stale one is rejected.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • addedInput schema / properties / design / description
      Added value: +"Stored draft name (from import_vehicle, create_land_vehicle, store_design or save_hull; see list_designs)."
    • addedInput schema / properties / revision / description
      Added value: +"The draft's current revision from query_parts or query_connections; a stale one is rejected."
  2. Addedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, and the description adds substantial context beyond them: the undo depth cap of ten batches, the absence of a redo path, and the two failure modes (stale revision, nothing left to undo). It also names the resulting revision and remaining step count, which is exactly the state an agent needs to recover from a failed call.

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 tight sentences: operation and scope first, then limits, then failure and return behavior. No filler, and the most decision-relevant facts are front-loaded.

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?

For a two-parameter mutation with an output schema and full annotation coverage, nothing an agent needs is missing: what it undoes, how deep the history goes, that there is no redo, how it fails, and what comes back.

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 both parameters are documented with source tools ('from query_parts or query_connections') and rejection behavior for stale revisions. The description's note that a stale revision causes failure restates what the schema already says, so it adds little beyond the baseline.

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 ('Revert') and resource ('a draft ... before its last committed batch') and enumerates exactly which sibling operations produce the batches it undoes (edit_parts, edit_connections, route_connections, repair_vehicle, apply_vehicle_assembly). This makes it clearly distinguishable from those siblings without opening either schema.

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?

Preconditions and limits are explicit: 'Keeps up to ten batches; there is no redo' and 'Fails when the revision is stale or nothing is left to undo.' The alternative is implied (redo is unavailable), but there is no explicit statement of when an agent should prefer a fresh load or re-edit instead of undoing.

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