Restore a record to a previous version
restore_resourceRevert a content record or datasource to a previous committed version, using a commit hash or undoing the latest change. The restore goes through the same gated write path and is itself committed.
Instructions
Revert a content record — or a datasource — to a prior committed version and write it back through the same gated write path as any other update (a DELETED block is recreated under its old id; a datasource restore needs data writes enabled). Omit ref to undo the most recent change, or pass a commit hash from vc_log; inspect it first with vc_diff. The restore is itself committed. Requires PORTAL_VC_DIR. NOT covered (never snapshotted): users, groups, permissions, credentials, api_keys, system records, db_modifications.
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": {
"resource": "<resource>",
"id": "<id>"
},
"name": "restore_resource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Record id. | |
| ref | No | Git commit hash/ref to restore from. Default: the version before the latest change to this record. | |
| resource | Yes | Record kind: 'block', a content resource key (layout, query, theme, partial, snippet, translation, dashboard, tag), or 'datasource'. |