list_timelines
Retrieve step execution records for a workflow to inspect results, debug failures, or analyze execution flow.
Instructions
List timelines (step execution records) for a specific execution. Each timeline represents a step that ran, with its status, output, and metadata. Use this to inspect individual step results, debug failures, or see the execution flow.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow ID | |
| executionId | Yes | The execution ID | |
| limit | No | Max results (default 50, max 500) | |
| direction | No | Sort order by creation time (default: desc) | |
| nextToken | No | Pagination cursor from a previous response. Pass this to fetch the next page of results. |
Implementation Reference
- src/tools/executions.ts:75-95 (handler)The 'list_timelines' tool is registered and implemented within 'registerExecutionTools' in 'src/tools/executions.ts'. It uses a client object generated from 'clientFactory' to fetch the timelines for a specific execution.
server.tool( 'list_timelines', `List timelines (step execution records) for a specific execution. Each timeline represents a step that ran, with its status, output, and metadata. Use this to inspect individual step results, debug failures, or see the execution flow.`, { workflowId: z.string().describe('The workflow ID'), executionId: z.string().describe('The execution ID'), limit: z.number().optional().describe('Max results (default 50, max 500)'), direction: z.enum(['asc', 'desc']).optional().describe('Sort order by creation time (default: desc)'), nextToken: z.string().optional().describe('Pagination cursor from a previous response. Pass this to fetch the next page of results.'), }, async ({ workflowId, executionId, limit, direction, nextToken }, extra) => { const client = clientFactory(extra); const result = await client.listTimelines(workflowId, executionId, { limit, direction, nextToken }); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; } );