Skip to content

rename_file

MCP tools › Workspace and files

Rename a workspace file or folder in place, like Rename… in the project tree: a name, not a path; refuses an existing name and the workspace folder itself. References in code are not updated (use rename_symbol or move_file for that). Returns the new workspace-relative path.

Capabilityworkspace.rename_file
AreaWorkspace and files
Accesschanges files
Reaches—
Rightswrite
Dry runnone

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative path of the file or folder.
new_namerequiredstringThe new name in the same folder (a name, not a path).

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 rename_file '{"path":"<string>","new_name":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"path",
"new_name"
],
"properties": {
"path": {
"description": "Workspace-relative path of the file or folder.",
"type": "string"
},
"new_name": {
"description": "The new name in the same folder (a name, not a path).",
"type": "string"
}
}
}