list_executions
Retrieve workflow execution history from n8n to monitor performance, track results, and analyze past runs for optimization.
Instructions
List n8n workflow executions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| cursor | No | ||
| workflowId | No |
Implementation Reference
- src/index.ts:195-195 (registration)Registration of the 'list_executions' tool in the ListToolsRequestSchema handler, defining name, description, and input schema.{ name: 'list_executions', description: 'List n8n workflow executions', inputSchema: { type: 'object', properties: { limit: { type: 'number' }, cursor: { type: 'string' }, workflowId: { type: 'string' } } } },
- src/index.ts:483-486 (handler)MCP tool handler for 'list_executions' that delegates to N8nClient.listExecutions and formats the response as MCP content.private async handleListExecutions(args: { limit?: number; cursor?: string; workflowId?: string }) { const executions = await this.n8nClient.listExecutions(args); return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess(executions), null, 2) }] }; }
- src/n8n-client.ts:733-741 (helper)Core helper method in N8nClient that performs the HTTP GET request to n8n's /api/v1/executions endpoint with query parameters for pagination and filtering.async listExecutions(options?: { limit?: number; cursor?: string; workflowId?: string }): Promise<N8nExecutionsListResponse> { const params = new URLSearchParams(); if (options?.limit) params.append('limit', options.limit.toString()); if (options?.cursor) params.append('cursor', options.cursor); if (options?.workflowId) params.append('workflowId', options.workflowId); const url = `/executions${params.toString() ? `?${params.toString()}` : ''}`; const response = await this.api.get<N8nExecutionsListResponse>(url); return response.data; }
- src/index.ts:288-289 (handler)Dispatch in CallToolRequestSchema handler that routes 'list_executions' calls to the specific handler method.case 'list_executions': return await this.handleListExecutions(request.params.arguments as { limit?: number; cursor?: string; workflowId?: string });