Skip to content

restore_local_revision

MCP tools › Workspace and files

Restore a workspace file to a local-history revision. The current state is recorded first, so the restore can be undone. dry_run defaults to true and returns the content that would be written (null = the file would be deleted).

Capabilityworkspace.restore_local_revision
AreaWorkspace and files
Accesschanges files
Reaches—
Rightswrite
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative file path (the file may no longer exist).
revisionintegerRevision id: whose content to return (local_history) or to restore.minimum 0
dry_runbooleanOnly report what a restore would write (default true; restore_local_revision only).

Call it from a shell

ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.

Terminal window
ferris-idea call ~/my-project restore_local_revision '{"path":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "Workspace-relative file path (the file may no longer exist).",
"type": "string"
},
"revision": {
"description": "Revision id: whose content to return (`local_history`) or to restore.",
"type": [
"integer",
"null"
],
"minimum": 0
},
"dry_run": {
"description": "Only report what a restore would write (default true; `restore_local_revision` only).",
"type": [
"boolean",
"null"
]
}
}
}