Skip to main content
Glama

delete-execution

Remove a specific workflow execution by ID to manage n8n automation history and optimize system performance.

Instructions

Delete a specific execution by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes

Implementation Reference

  • MCP tool handler for 'delete-execution' that retrieves the N8nClient instance and calls its deleteExecution method, handling errors and success responses.
    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
        };
      }
    }
  • Core implementation in N8nClient class that performs the HTTP DELETE request to the n8n API endpoint /executions/{id}.
    async deleteExecution(id: number): Promise<N8nExecution> {
      return this.makeRequest<N8nExecution>(`/executions/${id}`, {
        method: 'DELETE',
      });
    }
  • src/index.ts:722-732 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
      name: "delete-execution",
      description: "Delete a specific execution by ID.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          id: { type: "number" }
        },
        required: ["clientId", "id"]
      }
    },
  • Input schema definition for the delete-execution tool, specifying clientId (string) and id (number) as required parameters.
    inputSchema: {
      type: "object",
      properties: {
        clientId: { type: "string" },
        id: { type: "number" }
      },
      required: ["clientId", "id"]
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool deletes an execution, implying a destructive mutation, but doesn't cover critical aspects like whether deletion is permanent, requires specific permissions, has side effects (e.g., on related data), or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with zero wasted words, making it highly concise and front-loaded. Every word ('Delete a specific execution by ID') contributes essential information, adhering perfectly to efficiency standards.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a destructive operation with 2 parameters), lack of annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't address behavioral risks, parameter meanings, or expected outcomes, leaving significant gaps for safe and correct tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, meaning neither parameter (clientId, id) is documented in the schema. The description only mentions 'ID' generically, failing to clarify what 'clientId' represents or the format/scope of 'id'. It adds minimal value beyond the schema, insufficient to compensate for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and the target resource ('a specific execution by ID'), making the purpose immediately understandable. However, it doesn't differentiate this tool from other deletion tools like delete-credential or delete-workflow, which would require specifying what makes an 'execution' distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing execution ID), exclusions, or relationships with sibling tools like get-execution or list-executions, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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