Skip to main content
Glama

n8n_delete_execution

Remove execution records from n8n workflow history to manage storage and maintain clean logs.

Instructions

Delete an execution record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe execution ID to delete

Implementation Reference

  • The core handler function for the 'n8n_delete_execution' tool. It validates the execution ID from input arguments, calls the N8nApiClient to delete the execution, and returns a formatted success response.
    n8n_delete_execution: async ( client: N8nApiClient, args: Record<string, unknown> ): Promise<ToolResult> => { const id = args.id as string; if (!id) { throw new Error('Execution ID is required'); } await client.deleteExecution(id); return { content: [ { type: 'text' as const, text: JSON.stringify({ success: true, message: `Execution ${id} deleted successfully`, }, null, 2), }, ], }; },
  • Tool definition including the name, description, and input schema requiring a string 'id' parameter.
    { name: 'n8n_delete_execution', description: 'Delete an execution record.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'The execution ID to delete', }, }, required: ['id'], }, },
  • src/server.ts:127-131 (registration)
    Registration and dispatching logic in the MCP server. Routes tool calls matching executionToolHandlers (including n8n_delete_execution) to the appropriate handler function with the API client.
    // Execution tools if (name in executionToolHandlers) { const handler = executionToolHandlers[name as keyof typeof executionToolHandlers]; return handler(client, args); }
  • Central tool registry where executionTools (containing n8n_delete_execution definition) is combined into allTools for export to the MCP server.
    export const allTools: ToolDefinition[] = [ ...documentationTools, // Documentation first for discoverability ...workflowTools, ...executionTools, ];

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alicankiraz1/cursor-n8n-builder'

If you have feedback or need assistance with the MCP directory API, please join our Discord server