Skip to content

delete_file

MCP tools › Workspace and files

Delete a workspace file or folder. dry_run defaults to true and only reports what would go: the number of files and folders inside and the question the IDE asks. dry_run=false deletes; every deleted file is first recorded in the Local History, so local_history/restore_local_revision bring it back. The workspace folder itself is refused. paths instead of path deletes several items: all are checked first, items inside a listed folder count once, the result lists each and one question names the count.

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

Arguments

ArgumentTypeDescription
pathstringWorkspace-relative path of the file or folder.default ""
pathsarray of stringSeveral workspace-relative paths instead of path (SPEC-0275 v3); all are checked first.default []
dry_runbooleanOnly report what would be deleted (default true).

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 delete_file
Input schema as JSON
{
"type": "object",
"properties": {
"path": {
"description": "Workspace-relative path of the file or folder.",
"type": "string",
"default": ""
},
"paths": {
"description": "Several workspace-relative paths instead of `path` (SPEC-0275 v3); all are checked first.",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"dry_run": {
"description": "Only report what would be deleted (default true).",
"type": [
"boolean",
"null"
]
}
}
}