restore_file
Overwrite a file's current on-disk content with the version recorded at a specific git commit, enabling recovery of a known-good version or undoing accidental edits.
Instructions
DESTRUCTIVE. Overwrite a file's current on-disk content with the version recorded at a specific git commit, then re-index FTS. The hash MUST come from get_history for THIS file (foreign hashes throw). The current uncommitted content is lost unless it was already committed elsewhere. The file watcher may also pick up the change before this returns. No external auth or rate limits. Returns {file_id, path, hash, success, message}. Use only to undo accidental edits or recover a known-good version.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ID of the file | |
| hash | Yes | Commit hash to restore from (from get_history) |