list-executions
Retrieve and filter all executions from your N8N MCP instance using parameters like workflow ID, status, and data inclusion to manage and analyze workflow processes effectively.
Instructions
Retrieve all executions from your instance with optional filtering.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clientId | Yes | ||
| includeData | No | ||
| limit | No | ||
| status | No | ||
| workflowId | No |
Implementation Reference
- src/index.ts:1591-1627 (handler)Executes the list-executions tool by retrieving the N8nClient instance and calling its getExecutions method with provided filters.case "list-executions": { const { clientId, includeData, status, workflowId, limit } = args as { clientId: string; includeData?: boolean; status?: 'error' | 'success' | 'waiting'; workflowId?: string; limit?: number; }; const client = clients.get(clientId); if (!client) { return { content: [{ type: "text", text: "Client not initialized. Please run init-n8n first.", }], isError: true }; } try { const executions = await client.getExecutions({ includeData, status, workflowId, limit }); return { content: [{ type: "text", text: JSON.stringify(executions.data, null, 2), }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
- src/index.ts:690-707 (schema)Input schema and registration for the list-executions tool in the ListTools response.{ name: "list-executions", description: "Retrieve all executions from your instance with optional filtering.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, includeData: { type: "boolean" }, status: { type: "string", enum: ["error", "success", "waiting"] }, workflowId: { type: "string" }, limit: { type: "number" } }, required: ["clientId"] } },
- src/index.ts:270-283 (helper)N8nClient.getExecutions method implements the API call to /executions endpoint with query parameters for filtering executions.async getExecutions(options: { includeData?: boolean; status?: 'error' | 'success' | 'waiting'; workflowId?: string; limit?: number; } = {}): Promise<N8nExecutionList> { const params = new URLSearchParams(); if (options.includeData !== undefined) params.append('includeData', String(options.includeData)); if (options.status) params.append('status', options.status); if (options.workflowId) params.append('workflowId', options.workflowId); if (options.limit) params.append('limit', String(options.limit)); return this.makeRequest<N8nExecutionList>(`/executions?${params.toString()}`); }
- src/index.ts:74-77 (helper)Type definition for the response from n8n executions list API.interface N8nExecutionList { data: N8nExecution[]; nextCursor?: string; }