move_file
MCP tools › Workspace and files
Move workspace files or folders into another folder and update references: language-server edits (Rust modules, Java packages, TypeScript imports) plus Ferris IDEA's rewriting of relative C/C++ includes and JS/TS imports, also in the moved file. Only project sources change; references elsewhere (.venv, dependencies, build output, ignored files) are listed as numbered outside_project, changed only via include_outside. Folders, or update_references false, move plainly like Cut and Paste (never overwriting). paths moves several items, all checked first. Dry run unless dry_run false. A single moved file is one undo_refactoring group.
| Capability | workspace.move_file |
|---|---|
| Area | Workspace and files |
| Access | changes files |
| Reaches | process |
| Rights | write |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
path | string | Workspace-relative path of the file, or of a folder (folders always move plainly).default "" |
paths | array of string | Several workspace-relative paths instead of path (SPEC-0275 v3); all are checked first,
then they move one after the other.default [] |
target_dirrequired | string | Workspace-relative folder to move it into ("" or "." for the workspace folder). Created when missing for a file with reference updates; must exist for a plain move. |
dry_run | boolean | Only report the edits (default true). |
update_references | boolean | Update what refers to a moved file (SPEC-0114, default true). false moves it plainly, as Cut and Paste in the project tree do (SPEC-0275 v2). |
new_name | string | New name in the target folder (plain move only; default: the same name). |
include_outside | array of integer | Indexes into outside_project of the dry run to change too: references in files that are
not the project's own sources (a virtual environment, installed dependencies, build
output, excluded or ignored files). None by default; only with a single path
(SPEC-0114 v3 behaviour 8). |
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 move_file '{"target_dir":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "target_dir" ], "properties": { "path": { "description": "Workspace-relative path of the file, or of a folder (folders always move plainly).", "type": "string", "default": "" }, "paths": { "description": "Several workspace-relative paths instead of `path` (SPEC-0275 v3); all are checked first,\nthen they move one after the other.", "type": "array", "items": { "type": "string" }, "default": [] }, "target_dir": { "description": "Workspace-relative folder to move it into (\"\" or \".\" for the workspace folder). Created when\nmissing for a file with reference updates; must exist for a plain move.", "type": "string" }, "dry_run": { "description": "Only report the edits (default true).", "type": [ "boolean", "null" ] }, "update_references": { "description": "Update what refers to a moved file (SPEC-0114, default true). false moves it plainly, as\nCut and Paste in the project tree do (SPEC-0275 v2).", "type": [ "boolean", "null" ] }, "new_name": { "description": "New name in the target folder (plain move only; default: the same name).", "type": [ "string", "null" ] }, "include_outside": { "description": "Indexes into `outside_project` of the dry run to change too: references in files that are\nnot the project's own sources (a virtual environment, installed dependencies, build\noutput, excluded or ignored files). None by default; only with a single `path`\n(SPEC-0114 v3 behaviour 8).", "type": [ "array", "null" ], "items": { "type": "integer", "minimum": 0 } } }}