Undo the last write
undo_last_writeRestores a file to its state before the tracker server's last write, preventing lost edits by refusing if the file changed since then.
Instructions
Restore the file to its state before this server's last write. Refused if the file has changed since that write (it would lose someone else's edits).
The tool writes only with the user's yes. The client may ask in its own confirmation dialog. Otherwise call with dry_run=true, show the preview to the user, and after they agree in a new message repeat the same call with confirm=. The write is refused if the tracker changed since expected_version.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Token from the dry run the user approved. Not needed when the client shows the server's confirmation dialog | |
| dry_run | No | Only show what would change, plus the confirm token; write nothing | |
| expected_version | No | `version` from your last read; the write is refused if the file changed since |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||