Skip to main content
Glama

undo_write

Revert a sandbox file write to restore its previous contents, or delete the file if the write created it. Omit the path to undo the most recent write.

Instructions

Undo a sandbox file write: restores the previous contents, or deletes the file if the write created it. Without 'path' undoes the most recent write.

Input Schema

NameRequiredDescriptionDefault
pathNoFile to revert (relative to the sandbox root); omit for the last write

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and it does disclose the key mutation outcome — that the file may be deleted if the write created it. Missing are failure modes: what happens if the file changed after the write, whether repeated undos walk back further, and whether the operation errors or no-ops when nothing is undoable.

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?

A single tight sentence with the primary action front-loaded and the default-behavior clause second. No wasted text.

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 one-optional-parameter tool with no output schema, the description covers both behavioral branches (restore vs delete) and the no-argument default. It would be complete with a note on the response or on error conditions when there is nothing to undo.

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 the schema already documents that omitting path targets the last write, so the description's restatement adds little. A baseline 3 is appropriate since the schema does the parameter work.

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?

States a specific verb (undo) and resource (a sandbox file write) and spells out both possible outcomes: restoring previous contents or deleting a file the write created. It is clearly distinguishable from read_file/write_file, though it does not address the closest alternative, file_history, for inspecting prior versions.

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?

The phrase "Without 'path' undoes the most recent write" explains the default argument behavior, which implies when the tool applies. There is no explicit guidance on when to prefer undo over file_history for restoring state, nor any note on preconditions such as whether the write must still be the latest change.

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