Delete path
delete_pathDeletes a file or directory from the workspace, requiring recursive mode for folders; verify uncertain targets first because deletion is permanent.
Instructions
Delete a file or directory (recursive=true is required for directories). Not undoable. Use when: you remove files or folders. Take a snapshot first when they are not in git. Avoid when: the target is uncertain (check with get_file_info or list_files). Output: entries_deleted, bytes_deleted. Missing path gives not_found.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"relative_path": "<relative_path>"
},
"name": "delete_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Optional why (max 400 chars), audit-logged. | |
| recursive | No | true = delete a directory recursively (required for directories); snapshot it first. | |
| relative_path | Yes | Exact workspace path to delete. |