Snapshots
snapshotaction "create": snapshot everything now (code, databases, data; label optional). action "restore": go back to a snapshot (name from snapshot_list); scope code (default), database, data or all, for env preview (default) or production; needs confirm: true and the snapshots:restore permission. The state being replaced is kept, so a restore can itself be undone. action "undo": take back the last change in one call: the preview goes back to the newest snapshot taken before a change (by fs_write, fs_edit, exec or a pull), scope code by default, and the files it reverts are listed; confirm: true is needed only when that is more than 20 files; undo again walks back one more change (undo of code needs only write access, like the edit it takes back; scope database, data or all needs the snapshots:restore permission).
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": {
"project": "<project>",
"action": "<action>"
},
"name": "snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | preview | |
| name | No | Snapshot to restore (from snapshot_list). On create, taken as the label. | |
| label | No | ||
| scope | No | ||
| action | Yes | ||
| confirm | No | ||
| project | Yes | Project slug or id. | |
| idempotency_key | No | Any unique string; a repeated call with the same key has no second effect. |