list_executions
Retrieve recent workflow executions with execution ID, status, and timestamps. Filter by status, limit results, and paginate through execution history.
Instructions
List recent executions for a workflow. Returns execution id, status, timestamps.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow ID | |
| status | No | Filter: running, completed, failed | |
| limit | No | Max results (default 50, max 500) | |
| direction | No | Sort order (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:42-52 (handler)The handler function for the "list_executions" tool, which calls the client's listExecutions method and formats the result as MCP text content.
async ({ workflowId, status, limit, direction, nextToken }, extra) => { const client = clientFactory(extra); const result = await client.listExecutions(workflowId, { status, limit, direction, nextToken }); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; } ); - src/tools/executions.ts:33-41 (registration)Registration and schema definition for the "list_executions" tool, defining the required parameters and description.
'list_executions', 'List recent executions for a workflow. Returns execution id, status, timestamps.', { workflowId: z.string().describe('The workflow ID'), status: z.string().optional().describe('Filter: running, completed, failed'), limit: z.number().optional().describe('Max results (default 50, max 500)'), direction: z.enum(['asc', 'desc']).optional().describe('Sort order (default: desc)'), nextToken: z.string().optional().describe('Pagination cursor from a previous response. Pass this to fetch the next page of results.'), },