Delete Paths
deleteRemove files, directories, and symlinks when a path should no longer exist; set recursive for non-empty folders and use the returned undo ID to restore.
Instructions
Delete files, directories, and symlinks. Use when a path should no longer exist. Do not use it to rename or relocate; use move instead, and undo to restore. A symlink is removed, never its target. A non-empty directory needs recursive: true; without it, that path fails INVALID_INPUT. With it, the user must confirm. Nothing is deleted until every prompt is answered. A client that cannot prompt fails the whole call INVALID_INPUT. Deleting a folder that holds protected files cannot be undone. Other failures hit only their own path: ACCESS_DENIED for a root, read-only, or outside path; CANCELLED when refused or changed; INVALID_INPUT for a nested pair. Returns per-path { deleted } or { error } (a skipped prompt gives deleted: false), a summary, and an undo id valid 30 minutes, or undoUnavailable with the reason.
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": "delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Exact paths (no globs): files, directories, or symlinks. Duplicates collapse | |
| recursive | No | Required for a non-empty directory, else INVALID_INPUT. | |
| ignoreIfNotExists | No | True: a missing path returns deleted: true instead of failing NOT_FOUND |