restore_file
Restore a specific file version into the working tree while preserving the overwritten content as a new version, so the restore can be undone.
Instructions
Write a journaled version of one file back into the working tree.
version: a version id from file_history, or "HEAD" for the committed content. The content being overwritten is kept as a new version, so the restore can be undone.
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": {
"path": "<path>",
"version": "<version>"
},
"name": "restore_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||