restore_version
Restore a Nextcloud file to a previous version by file ID and version ID. The current content is preserved as a new version, preventing data loss.
Instructions
Restore a file to a previous version.
The file's current content is replaced with the content from the specified version. The pre-restore content is preserved as a new version in the history, so no data is lost.
Args: file_id: The numeric Nextcloud file ID. version_id: The version identifier from list_versions (a unix timestamp string, e.g. "1711000000").
Returns: Confirmation message.
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": {
"file_id": "<file_id>",
"version_id": "<version_id>"
},
"name": "restore_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_id | Yes | ||
| version_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |