Skip to main content
Glama

n8n_delete_execution

Remove execution records from n8n workflow history to manage data and maintain system performance.

Instructions

Delete an execution record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe execution ID to delete

Implementation Reference

  • The handler function that validates the execution ID, calls the N8nApiClient to delete the execution, and returns a 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),
          },
        ],
      };
    },
  • The tool definition including name, description, and input schema requiring '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)
    Runtime registration and dispatch: checks if the tool name exists in executionToolHandlers and invokes the handler with API client and arguments.
    // Execution tools
    if (name in executionToolHandlers) {
      const handler = executionToolHandlers[name as keyof typeof executionToolHandlers];
      return handler(client, args);
    }
  • Aggregates all tool definitions (including n8n_delete_execution schema) into allTools array used for listing available tools.
    export const allTools: ToolDefinition[] = [
      ...documentationTools,  // Documentation first for discoverability
      ...workflowTools,
      ...executionTools,
    ];
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Delete') but doesn't clarify if this is reversible, requires specific permissions, has side effects (e.g., affecting workflow runs), or provides confirmation feedback. For a destructive operation 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, direct sentence ('Delete an execution record.') with zero wasted words. It is appropriately sized for a simple tool and front-loaded with the core action, making it highly efficient and easy to parse.

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 destructive nature, lack of annotations, and no output schema, the description is incomplete. It doesn't address critical context like irreversibility, error handling, or what happens post-deletion (e.g., if the execution is removed from lists). For a delete operation, this leaves the agent with insufficient information to use it safely and effectively.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'id' parameter clearly documented as 'The execution ID to delete'. The description adds no additional meaning beyond this, such as format examples or sourcing hints. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

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 verb ('Delete') and resource ('execution record'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'n8n_delete_workflow' or 'n8n_list_executions', which would require mentioning it specifically targets execution records rather than workflows or other entities.

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 execution ID from 'n8n_list_executions'), exclusions, or comparisons to siblings like 'n8n_get_execution' for viewing instead of deleting. This leaves the agent without context for 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

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