Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Delete n8n Workflow

n8n_delete_workflow
DestructiveIdempotent

Permanently delete a workflow from n8n. This action cannot be undone, so ensure you have the correct workflow ID before proceeding.

Instructions

Permanently delete a workflow.

⚠️ WARNING: This action cannot be undone!

Args:

  • id (string): Workflow ID to delete

Returns: Confirmation of deletion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe unique identifier of the resource

Implementation Reference

  • Implementation of the n8n_delete_workflow tool, which registers the tool with the MCP server and executes a DELETE request to remove the workflow.
      server.registerTool(
        'n8n_delete_workflow',
        {
          title: 'Delete n8n Workflow',
          description: `Permanently delete a workflow.
    
    ⚠️ WARNING: This action cannot be undone!
    
    Args:
      - id (string): Workflow ID to delete
    
    Returns:
      Confirmation of deletion.`,
          inputSchema: IdParamSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: true,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof IdParamSchema>) => {
          await del(`/workflows/${params.id}`);
          
          return {
            content: [{ type: 'text', text: `✅ Workflow ${params.id} deleted successfully.` }],
            structuredContent: { deleted: true, id: params.id }
          };
        }
      );
Behavior4/5

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

Annotations already indicate destructiveHint=true and idempotentHint=true, but the description adds valuable context with the explicit warning 'This action cannot be undone!' and clarifies the return value ('Confirmation of deletion'). This enhances transparency beyond what annotations provide without contradicting them.

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 a clear purpose statement, warning, and separate Args/Returns sections. It's appropriately sized but could be slightly more concise by integrating the warning into the main sentence without losing clarity.

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 tool with good annotations and a simple parameter schema, the description is mostly complete. It covers the irreversible nature and return confirmation, though it could benefit from mentioning idempotency or error cases, but annotations help fill some gaps.

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 the parameter 'id' already documented as 'The unique identifier of the resource'. The description adds no additional semantic information about the parameter beyond restating it in the Args section, meeting the baseline for high schema coverage.

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 action ('permanently delete') and resource ('workflow'), distinguishing it from siblings like n8n_deactivate_workflow or n8n_delete_execution. It uses specific language that leaves no ambiguity about what the tool does.

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 description provides a warning about irreversibility, which implies when to be cautious, but doesn't explicitly state when to use this tool versus alternatives like n8n_deactivate_workflow or n8n_delete_executions. No prerequisites or specific usage contexts are mentioned beyond the warning.

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