Skip to main content
Glama

n8n_delete_workflow

DestructiveIdempotent

Permanently delete a workflow and all associated execution history. Ensure the workflow is deactivated first as this action cannot be undone.

Instructions

Permanently delete a workflow and all associated execution history. This action cannot be undone. Workflow must be deactivated first. Use with caution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWorkflow ID to permanently delete

Implementation Reference

  • The actual handler method that executes the delete workflow logic. Makes an authenticated DELETE request to the n8n API endpoint /api/v1/workflows/{id}
    async deleteWorkflow(id: string) {
      return this.request(`${this.apiBase}/workflows/${id}`, { method: 'DELETE' });
    }
  • Tool schema definition including name, description, input schema (requires 'id' parameter), and annotations marking it as destructive and idempotent
      name: 'n8n_delete_workflow',
      description: 'Permanently delete a workflow and all associated execution history. This action cannot be undone. Workflow must be deactivated first. Use with caution.',
      inputSchema: {
        type: 'object',
        properties: {
          id: { type: 'string', description: 'Workflow ID to permanently delete' },
        },
        required: ['id'],
      },
      annotations: {
        title: 'Delete Workflow',
        readOnlyHint: false,
        destructiveHint: true,
        idempotentHint: true,
        openWorldHint: true,
      },
    },
  • src/server.ts:33-34 (registration)
    Registration point where the tool name 'n8n_delete_workflow' is mapped to the client.deleteWorkflow handler method
    case 'n8n_delete_workflow':
      return client.deleteWorkflow(args.id);
Behavior4/5

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

Annotations already indicate destructiveHint=true and readOnlyHint=false, but the description adds valuable context beyond this: it specifies that the action is permanent and irreversible, mentions the prerequisite of deactivation, and warns to use with caution, enhancing the agent's understanding of behavioral risks.

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 front-loaded with the core action and key warnings in three concise sentences, each earning its place by providing critical information without redundancy or unnecessary elaboration.

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 complexity (destructive operation with prerequisites), the description is largely complete: it covers purpose, guidelines, and behavioral context. However, without an output schema, it does not describe return values or error conditions, leaving a minor gap in full contextual understanding.

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 one parameter ('id') fully documented in the schema. The description does not add any additional semantic details about the parameter beyond what the schema provides, so it meets 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 specific action ('permanently delete'), the resource ('workflow and all associated execution history'), and distinguishes it from siblings like 'n8n_deactivate_workflow' by emphasizing the irreversible nature of deletion versus deactivation.

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

Usage Guidelines4/5

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

It provides explicit context for when to use ('Workflow must be deactivated first') and a cautionary note ('Use with caution'), but does not name specific alternatives or explicitly state when not to use it compared to other deletion tools like 'n8n_delete_execution'.

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