Delete file or directory
delete_pathDelete a file or a directory in the sandbox; a directory is removed with everything in it unless recursive=false (then only an empty one). Use it to clean up before running something again or to free disk space – the deletion cannot be undone. A path that does not exist returns an error and / cannot be removed. No separate mkdir is needed: writing a file creates its missing parent directories (for an empty directory run mkdir -p as a shell command).
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": {
"path": "<path>"
},
"name": "delete_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the file or directory, e.g. /home/user/build | |
| recursive | No | Remove a directory with its contents (default true); false removes only an empty directory. | |
| sandbox_id | No | Sandbox ID (sb_…). If omitted, the current sandbox of this session is used. A sandbox_id you pass becomes the current sandbox for later calls without sandbox_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The deleted path. | |
| deleted | Yes | The path was deleted. | |
| sandbox_id | Yes | Sandbox ID. |