rm
Remove files and directories with dry-run preview, recursive deletion, and sandbox protections. Destructive operation; deleted data cannot be recovered.
Instructions
Remove files or recursively delete directories with dry-run and safety protections. Destructive and irreversible: deleted data cannot be recovered. Use --dry_run to preview which files would be removed. Recursive directory removal requires --recursive. Sandbox checks prevent deletion outside the current working directory without explicit --allow_outside_cwd. Returns JSON with removed paths. Use to delete files and directories. Not for secure deletion — use 'shred' to overwrite before removal. Not for removing only empty directories — use 'rmdir'. See also 'rmdir', 'shred', 'unlink'.
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": {
"paths": "<paths>"
},
"name": "rm"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Ignore missing files. | |
| paths | Yes | Paths to remove. | |
| dry_run | No | Report operations without changing files. | |
| recursive | No | Remove directories recursively. | |
| allow_outside_cwd | No | Allow recursive directory removal outside the current working directory. |