Skip to main content
Glama

n8n_delete_execution

DestructiveIdempotent

Permanently delete execution records from n8n workflow history to save storage space and maintain clean logs after debugging or testing.

Instructions

Remove execution record from history to save storage or clean up test runs. Permanently deletes execution data. Use after debugging or to maintain clean execution logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesExecution ID to permanently remove

Implementation Reference

  • The deleteExecution method that implements the actual tool logic - makes an HTTP DELETE request to the n8n API endpoint /executions/{id}
    async deleteExecution(id: string) {
      return this.request(`${this.apiBase}/executions/${id}`, { method: 'DELETE' });
    }
  • Tool definition with name 'n8n_delete_execution', description, inputSchema (requires 'id' property), and annotations including destructiveHint: true
    {
      name: 'n8n_delete_execution',
      description: 'Remove execution record from history to save storage or clean up test runs. Permanently deletes execution data. Use after debugging or to maintain clean execution logs.',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Execution ID to permanently remove' },
        },
        required: ['id'],
      },
      annotations: {
        title: 'Delete Execution',
        readOnlyHint: false,
        destructiveHint: true,
        idempotentHint: true,
        openWorldHint: true,
      },
    },
  • src/server.ts:51-52 (registration)
    Case handler in handleToolCall switch statement that routes 'n8n_delete_execution' tool calls to client.deleteExecution(args.id)
    case 'n8n_delete_execution':
      return client.deleteExecution(args.id);
  • src/server.ts:128-130 (registration)
    Registers the TOOLS array (containing n8n_delete_execution definition) with the MCP server via ListToolsRequestSchema handler
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools: TOOLS };
    });
Behavior4/5

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

The description adds valuable context beyond annotations by explicitly stating 'Permanently deletes execution data,' reinforcing the destructive nature (though destructiveHint=true already indicates this). It also mentions the storage-saving benefit and cleanup use case, which provides practical behavioral insight not covered by annotations. No contradiction with annotations exists.

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 highly concise and well-structured with three sentences that each serve a distinct purpose: stating the action and purpose, emphasizing permanence, and providing usage guidelines. There is no wasted verbiage, and key information is front-loaded.

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

Completeness4/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 (annotations cover safety aspects) and simple single-parameter schema, the description is mostly complete. It explains the purpose, usage context, and permanence effectively. However, without an output schema, it could benefit from mentioning what happens after deletion (e.g., confirmation message or error handling), leaving a minor gap.

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?

With 100% schema description coverage, the input schema already fully documents the single parameter ('Execution ID to permanently remove'). The description does not add any additional parameter-specific information beyond what's in the schema, so it meets the baseline expectation without extra value.

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

Purpose5/5

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

The description clearly states the specific action ('Remove execution record from history') and resource ('execution record'), distinguishing it from siblings like n8n_get_execution (read) and n8n_list_executions (list). It explicitly mentions the purpose ('to save storage or clean up test runs'), making the intent unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('Use after debugging or to maintain clean execution logs'), which helps differentiate it from alternatives like n8n_get_execution for viewing or n8n_retry_execution for re-running. It clearly indicates this is for cleanup purposes rather than operational use.

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/node2flow-th/n8n-management-mcp-community'

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