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).
| Capability | workspace.restore_local_revision |
|---|---|
| Area | Workspace and files |
| Access | changes files |
| Reaches | — |
| Rights | write |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-relative file path (the file may no longer exist). |
revision | integer | Revision id: whose content to return (local_history) or to restore.minimum 0 |
dry_run | boolean | Only 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.
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" ] } }}