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.
| Capability | workspace.delete_file |
|---|---|
| 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 |
|---|---|---|
path | string | Workspace-relative path of the file or folder.default "" |
paths | array of string | Several workspace-relative paths instead of path (SPEC-0275 v3); all are checked first.default [] |
dry_run | boolean | Only 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.
ferris-idea call ~/my-project delete_fileInput 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" ] } }}