Skip to main content
Glama

retry_execution

Retry failed workflow steps to resume execution from the point of failure, automatically detecting the most recent failed timeline if not specified.

Instructions

Retry a failed step in a workflow execution. If no timelineId is provided, the most recent failed timeline is automatically detected and retried. This re-runs the failed step and continues the workflow from that point.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe workflow ID
executionIdYesThe execution ID containing the failed step
timelineIdNoSpecific timeline ID to retry. If omitted, the most recent failed timeline is auto-detected.
forceWithoutCacheNoBypass cache when retrying the step

Implementation Reference

  • The MCP tool 'retry_execution' registration and its handler implementation in 'src/tools/executions.ts'. It uses the 'clientFactory' to call the client's 'retryExecution' method.
    server.tool(
        'retry_execution',
        `Retry a failed step in a workflow execution. If no timelineId is provided, the most recent failed timeline is automatically detected and retried. This re-runs the failed step and continues the workflow from that point.`,
        {
            workflowId: z.string().describe('The workflow ID'),
            executionId: z.string().describe('The execution ID containing the failed step'),
            timelineId: z.string().optional().describe('Specific timeline ID to retry. If omitted, the most recent failed timeline is auto-detected.'),
            forceWithoutCache: z.boolean().optional().describe('Bypass cache when retrying the step'),
        },
        async ({ workflowId, executionId, timelineId, forceWithoutCache }, extra) => {
            const client = clientFactory(extra);
            const result = await client.retryExecution(workflowId, executionId, {
                timelineId,
                forceWithoutCache,
            });
            return {
                content: [{
                    type: 'text' as const,
                    text: JSON.stringify(result, null, 2),
                }],
            };
        }
    );
  • The 'retryExecution' method in 'AgentledClient' class, which performs the actual HTTP POST request to the API to trigger the retry.
    async retryExecution(
        workflowId: string,
        executionId: string,
        options?: { timelineId?: string; forceWithoutCache?: boolean }
    ) {
        return this.request(`/workflows/${workflowId}/executions/${executionId}/retry`, {
            method: 'POST',
            body: JSON.stringify({
                timelineId: options?.timelineId,
                forceWithoutCache: options?.forceWithoutCache,
            }),
        });
    }

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