Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Delete n8n Executions (Bulk)

n8n_delete_executions
Destructive

Remove workflow executions in n8n using filters like workflow ID, status, date range, or specific IDs to manage automation history and optimize performance.

Instructions

Delete multiple executions based on filters.

⚠️ WARNING: This action cannot be undone! Use with caution.

Args:

  • workflowId (string, optional): Delete executions for this workflow

  • status (string, optional): Delete executions with this status

  • deleteBefore (string, optional): Delete executions before this date (ISO 8601 format)

  • ids (array, optional): Specific execution IDs to delete

Returns: Count of deleted executions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdNoDelete executions for this workflow
statusNoDelete executions with this status
deleteBeforeNoDelete executions before this date (ISO 8601)
idsNoSpecific execution IDs to delete

Implementation Reference

  • Registration and handler logic for the 'n8n_delete_executions' tool.
      server.registerTool(
        'n8n_delete_executions',
        {
          title: 'Delete n8n Executions (Bulk)',
          description: `Delete multiple executions based on filters.
    
    ⚠️ WARNING: This action cannot be undone! Use with caution.
    
    Args:
      - workflowId (string, optional): Delete executions for this workflow
      - status (string, optional): Delete executions with this status
      - deleteBefore (string, optional): Delete executions before this date (ISO 8601 format)
      - ids (array, optional): Specific execution IDs to delete
    
    Returns:
      Count of deleted executions.`,
          inputSchema: DeleteExecutionsSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: true,
            idempotentHint: false,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof DeleteExecutionsSchema>) => {
          const result = await post<{ deletedCount: number }>('/executions/delete', params);
          
          return {
            content: [{ type: 'text', text: `✅ Deleted ${result.deletedCount} execution(s).` }],
            structuredContent: result
          };
        }
      );
Behavior5/5

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

Annotations already indicate destructiveHint=true, but the description adds critical behavioral context with the explicit warning '⚠️ WARNING: This action cannot be undone! Use with caution.' This goes beyond annotations by emphasizing irreversible consequences and caution needed.

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

Conciseness4/5

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

The description is well-structured with warning, parameter list, and return statement. It's appropriately sized, though the Args section duplicates schema information. Every sentence adds value, particularly the warning.

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?

For a destructive bulk deletion tool with good annotations and full schema coverage, the description provides adequate context. The warning addresses the critical behavioral risk, though it could mention prerequisites (like permissions) or clarify that parameters are optional filters.

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?

Schema description coverage is 100%, with each parameter clearly documented in the schema. The description's Args section repeats schema information without adding meaningful semantic context beyond what's already in structured fields.

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 verb ('Delete') and resource ('multiple executions'), specifying it's a bulk operation. It distinguishes from sibling 'n8n_delete_execution' (singular) by emphasizing bulk deletion based on filters.

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

Usage Guidelines3/5

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

The warning provides cautionary context, but there's no explicit guidance on when to use this vs. alternatives like 'n8n_delete_execution' (singular deletion) or 'n8n_list_executions' (for viewing). Usage is implied through parameter descriptions rather than stated.

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

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