Skip to main content
Glama

delete-execution

Remove a specific execution by its ID from the MCP-N8N server. Requires client ID and execution ID for precise deletion.

Instructions

Delete a specific execution by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes

Implementation Reference

  • Handler for executing the 'delete-execution' tool. Validates client, calls N8nClient.deleteExecution(id), and returns success message with execution details or error.
    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
        };
      }
    }
  • src/index.ts:722-732 (registration)
    Registration of the 'delete-execution' tool in the ListToolsRequestSchema handler, 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"]
    }
  • N8nClient helper method that performs the actual DELETE request to the n8n API endpoint /executions/{id}.
    async deleteExecution(id: number): Promise<N8nExecution> {
      return this.makeRequest<N8nExecution>(`/executions/${id}`, {
        method: 'DELETE',
      });
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the destructive action ('Delete') but lacks critical details: whether deletion is permanent or reversible, what permissions are required, if there are side effects (e.g., cascading deletions), or what happens on success/failure. For a destructive tool with zero annotation coverage, this is a significant gap in transparency.

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, efficient sentence with zero wasted words. It's appropriately sized for a simple deletion operation and front-loads the core action and target, making it easy to parse quickly.

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 this is a destructive tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't address critical aspects like what 'execution' means in this context, the consequences of deletion, error conditions, or return values. For a tool that permanently removes data, more context is needed.

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?

Schema description coverage is 0%, so the description must compensate but fails to do so. It mentions 'ID' but doesn't clarify which parameter (id vs clientId) represents the execution ID, what format these IDs take, or their purpose. With 2 undocumented parameters, the description adds minimal value beyond the schema's structural information.

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 target resource ('a specific execution by ID'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling deletion tools like delete-credential or delete-workflow, which would require mentioning what makes an 'execution' distinct from those other resources.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing an existing execution ID), exclusions, or relationships with sibling tools like get-execution or list-executions. This leaves the agent without context for proper tool selection.

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

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

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