restore_from_recycle_bin
Restore deleted files or folders from a shared folder's recycle bin to their original locations or a chosen folder, with optional overwrite for existing items.
Instructions
Restore deleted files or folders from one shared folder's recycle bin. Check what's there first with list_recycle_bin: every path must be in that share's bin, or nothing is restored; an empty item, naming the whole bin, is refused. Without dest_folder, each item goes back to its original folder, which is re-created if it's gone. An item whose name is already at the destination is skipped and stays in the bin, unless overwrite=true, which replaces the existing one, which may then not be in the recycle bin; two items that would replace each other are refused. A long restore keeps running on the NAS and returns a handle for file_task. While this user's running task is landing the same name there, the call is refused if either one replaces. That can miss another account's task or a start at the same moment from another server process, and DSM's tasks if its task list fails; overwrite=false never replaces.
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": {
"share": "<share>",
"paths": "<paths>"
},
"name": "restore_from_recycle_bin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Items to restore, as paths in the bin the way list_recycle_bin shows them (`Shows/Ep1.mkv`); full paths such as `/video/#recycle/Shows/Ep1.mkv` work too. | |
| share | Yes | The shared folder whose bin holds the items, as a name (`video`) or path (`/video`). | |
| overwrite | No | Replace an item already at the destination; a replaced file may not be in the recycle bin (default false: it's skipped and stays in the bin). | |
| dest_folder | No | An existing folder to restore everything into, flat (default: each item's original folder). |