delete_files
Delete exact files or folders on a Synology NAS, recursively by default; items go to the recycle bin when available, otherwise deletion is permanent.
Instructions
Delete files or folders. A folder is deleted with everything in it (recursive, default true). On a share with a recycle bin, deleted items go to the bin (empty folders aren't kept): list_recycle_bin shows them and restore_from_recycle_bin brings them back. Without a bin, and for anything inside a bin (/<share>/#recycle/…), deletion is permanent. Paths are exact, not wildcard patterns, and if any path is missing nothing is deleted. A whole shared folder (/video), recycle bin (/video/#recycle) or user's home folder (/homes/<user>) is refused: delete its items by path. So is a path with a ., .. or empty part, or a NUL. A long delete keeps running on the NAS and returns a handle for file_task.
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_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Exact paths of the files or folders to delete (`/video/Downloads/old.mkv`); wildcards aren't expanded. | |
| recursive | No | Delete a folder with everything in it (default true); with `false`, a folder that isn't empty is refused and kept. |