Skip to main content
Glama

n8n_delete_workflow

Permanently delete a workflow from the n8n automation platform. This action cannot be undone, so use it to remove unwanted or obsolete workflows.

Instructions

Permanently delete a workflow. This action cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe workflow ID to delete

Implementation Reference

  • The handler function that implements the n8n_delete_workflow tool. It extracts the workflow ID from arguments, validates it, calls the N8nApiClient's deleteWorkflow method, and returns a success response.
    n8n_delete_workflow: async (
      client: N8nApiClient,
      args: Record<string, unknown>
    ): Promise<ToolResult> => {
      const id = args.id as string;
      if (!id) {
        throw new Error('Workflow ID is required');
      }
    
      await client.deleteWorkflow(id);
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify({
              success: true,
              message: `Workflow ${id} deleted successfully`,
            }, null, 2),
          },
        ],
      };
    },
  • The tool definition including name, description, and input schema for validating the 'id' parameter.
    {
      name: 'n8n_delete_workflow',
      description: 'Permanently delete a workflow. This action cannot be undone.',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'The workflow ID to delete',
          },
        },
        required: ['id'],
      },
    },
  • src/server.ts:122-125 (registration)
    The registration/dispatch logic in the MCP server that routes tool calls matching workflowToolHandlers (including n8n_delete_workflow) to the appropriate handler function.
    if (name in workflowToolHandlers) {
      const handler = workflowToolHandlers[name as keyof typeof workflowToolHandlers];
      return handler(client, args);
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates the destructive nature ('Permanently delete') and irreversible consequence ('This action cannot be undone'), which are critical for a deletion tool. However, it doesn't mention authentication requirements, error conditions, or what happens to associated executions.

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 perfectly concise with two sentences that each serve distinct purposes: the first states the action, the second warns about consequences. There's no wasted language, and the most critical information (permanent deletion) 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?

For a destructive operation with no annotations and no output schema, the description does well by emphasizing the irreversible nature. However, it could be more complete by mentioning what happens to associated executions or providing guidance on prerequisites (e.g., workflow must be deactivated first). The sibling context suggests this is part of a workflow management system where such considerations might be relevant.

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?

The schema description coverage is 100%, with the single parameter 'id' clearly documented in the schema. The description doesn't add any parameter-specific information beyond what the schema already provides, so it meets the baseline expectation 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') and target resource ('a workflow'), distinguishing it from siblings like n8n_deactivate_workflow or n8n_update_workflow. It uses precise language that leaves no ambiguity about the tool's function.

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?

The description provides clear context about when to use this tool (to permanently delete a workflow) and implicitly distinguishes it from deactivation (n8n_deactivate_workflow). However, it doesn't explicitly mention alternatives or provide specific exclusion criteria beyond the irreversible nature of the action.

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/alicankiraz1/cursor-n8n-builder'

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