Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

n8n_delete_executions

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
          };
        }
      );

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