Skip to main content
Glama

delete-execution

Remove a specific workflow execution by ID from the n8n MCP Server, ensuring precise management of workflow history and resources. Requires client ID and execution ID for targeted deletion.

Instructions

Delete a specific execution by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes

Implementation Reference

  • The main handler for the 'delete-execution' MCP tool. It extracts clientId and execution id from arguments, retrieves the N8nClient instance, calls deleteExecution(id), and returns success or error response.
    case "delete-execution": { const { clientId, id } = args as { clientId: string; id: 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 execution = await client.deleteExecution(id); return { content: [{ type: "text", text: `Successfully deleted execution:\n${JSON.stringify(execution, null, 2)}`, }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
  • Input schema and metadata for the 'delete-execution' tool, defined in the ListTools response. Specifies required parameters: clientId (string) and id (number).
    name: "delete-execution", description: "Delete a specific execution by ID.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, id: { type: "number" } }, required: ["clientId", "id"] }
  • src/index.ts:722-731 (registration)
    Registration of the 'delete-execution' tool in the list of available tools returned by ListToolsRequestHandler.
    name: "delete-execution", description: "Delete a specific execution by ID.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, id: { type: "number" } }, required: ["clientId", "id"] }
  • Core implementation in N8nClient class: sends DELETE request to n8n REST API endpoint `/executions/${id}` to delete the execution.
    async deleteExecution(id: number): Promise<N8nExecution> { return this.makeRequest<N8nExecution>(`/executions/${id}`, { method: 'DELETE', }); }

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/illuminaresolutions/n8n-mcp-server'

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