Skip to main content
Glama

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
NameRequiredDescriptionDefault
workflowIdYesThe workflow ID
snapshotIdYesThe snapshot ID to restore (from list_snapshots)

Implementation Reference

  • 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),
                    }],
                };
            }
        );
  • 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 }),
        });
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Agentled/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server