restore_snapshot
Revert a workflow to a previous configuration snapshot, restoring steps, context, name, description, goal, and style to the captured state.
Instructions
Restore a workflow to a previous config snapshot. Use list_snapshots first to find the snapshot ID. This will revert the workflow's steps, context, name, description, goal, and style to the state captured in the snapshot.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow ID | |
| snapshotId | Yes | The snapshot ID to restore (from list_snapshots) |
Implementation Reference
- src/tools/workflows.ts:199-218 (handler)Tool registration and handler definition for 'restore_snapshot' which delegates to the client.
server.tool( 'restore_snapshot', `Restore a workflow to a previous config snapshot. Use list_snapshots first to find the snapshot ID. This will revert the workflow's steps, context, name, description, goal, and style to the state captured in the snapshot.`, { workflowId: z.string().describe('The workflow ID'), snapshotId: z.string().describe('The snapshot ID to restore (from list_snapshots)'), }, async ({ workflowId, snapshotId }, extra) => { const client = clientFactory(extra); const result = await client.restoreSnapshot(workflowId, snapshotId); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; } ); - src/client.ts:140-145 (helper)API client implementation of 'restoreSnapshot' which sends the request to the backend.
async restoreSnapshot(workflowId: string, snapshotId: string) { return this.request(`/workflows/${workflowId}/snapshots`, { method: 'POST', body: JSON.stringify({ snapshotId }), }); }