delete_execution
Remove specific workflow executions from n8n by providing the execution ID to manage workflow history and optimize system performance.
Instructions
Delete an n8n execution
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/index.ts:493-496 (handler)MCP server handler method for the 'delete_execution' tool. Delegates deletion to the N8nClient and returns success response.private async handleDeleteExecution(args: { id: string }) { await this.n8nClient.deleteExecution(args.id); return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess({ id: args.id }), null, 2) }] }; }
- src/index.ts:197-197 (registration)Tool registration in the list of available tools, including name, description, and input schema.{ name: 'delete_execution', description: 'Delete an n8n execution', inputSchema: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] } },
- src/index.ts:197-197 (schema)Input schema definition for the 'delete_execution' tool, requiring a string 'id'.{ name: 'delete_execution', description: 'Delete an n8n execution', inputSchema: { type: 'object', properties: { id: { type: 'string' } }, required: ['id'] } },
- src/index.ts:292-293 (handler)Dispatch case in the main tool request handler that routes to the specific delete_execution handler.case 'delete_execution': return await this.handleDeleteExecution(request.params.arguments as { id: string });
- src/n8n-client.ts:748-751 (helper)N8nClient method that performs the actual API DELETE request to /executions/{id}.async deleteExecution(id: string): Promise<N8nExecutionDeleteResponse> { await this.api.delete(`/executions/${id}`); return { success: true }; }