n8n_delete_execution
Permanently delete execution records from n8n workflow history to save storage space and maintain clean logs after debugging or testing.
Instructions
Remove execution record from history to save storage or clean up test runs. Permanently deletes execution data. Use after debugging or to maintain clean execution logs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Execution ID to permanently remove |
Implementation Reference
- src/n8n-client.ts:120-122 (handler)The deleteExecution method that implements the actual tool logic - makes an HTTP DELETE request to the n8n API endpoint /executions/{id}
async deleteExecution(id: string) { return this.request(`${this.apiBase}/executions/${id}`, { method: 'DELETE' }); } - src/tools.ts:228-245 (schema)Tool definition with name 'n8n_delete_execution', description, inputSchema (requires 'id' property), and annotations including destructiveHint: true
{ name: 'n8n_delete_execution', description: 'Remove execution record from history to save storage or clean up test runs. Permanently deletes execution data. Use after debugging or to maintain clean execution logs.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Execution ID to permanently remove' }, }, required: ['id'], }, annotations: { title: 'Delete Execution', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true, }, }, - src/server.ts:51-52 (registration)Case handler in handleToolCall switch statement that routes 'n8n_delete_execution' tool calls to client.deleteExecution(args.id)
case 'n8n_delete_execution': return client.deleteExecution(args.id); - src/server.ts:128-130 (registration)Registers the TOOLS array (containing n8n_delete_execution definition) with the MCP server via ListToolsRequestSchema handler
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: TOOLS }; });