Skip to main content
Glama

delete_workflow

Remove an n8n workflow from the testing environment using its ID to clean up test workflows and manage workflow inventory.

Instructions

Delete an n8n workflow by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYes

Implementation Reference

  • The deleteWorkflow function makes a DELETE request to the n8n API to delete a workflow by ID. It constructs the API URL, sends the request with proper headers, and returns a confirmation object with deleted: true and the workflowId.
    export async function deleteWorkflow(workflowId: string) {
      const { baseUrl } = getEnv();
      const response = await fetch(`${baseUrl}/api/v1/workflows/${workflowId}`, {
        method: 'DELETE',
        headers: buildHeaders(),
      });
      if (!response.ok) throw new Error(`n8n API returned ${response.status}`);
      return { deleted: true, workflowId };
    }
  • src/index.ts:68-75 (registration)
    Tool registration for 'delete_workflow' with description 'Delete an n8n workflow by ID.' and input schema defining a required workflowId string property.
      name: 'delete_workflow',
      description: 'Delete an n8n workflow by ID.',
      inputSchema: {
        type: 'object',
        properties: { workflowId: { type: 'string' } },
        required: ['workflowId'],
      },
    },
  • Handler for 'delete_workflow' tool calls - validates the workflowId argument using Zod schema, calls the deleteWorkflow function, and returns the result as JSON text content.
    if (name === 'delete_workflow') {
      const { workflowId } = z.object({ workflowId: z.string() }).parse(args);
      const deleted = await deleteWorkflow(workflowId);
      return { content: [{ type: 'text', text: JSON.stringify(deleted, null, 2) }] };
    }
Behavior2/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 states the action is 'Delete,' implying a destructive mutation, but doesn't elaborate on critical aspects like whether deletion is permanent, requires specific permissions, triggers side effects, or returns confirmation data. This leaves significant gaps for a tool that performs a potentially irreversible operation.

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 a single, direct sentence with zero wasted words. It front-loads the core action and resource, making it highly efficient and easy to parse, which is ideal for a simple tool like this.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a destructive operation with no annotations or output schema), the description is incomplete. It lacks details on behavioral traits (e.g., irreversibility, permissions), expected outcomes, or error handling, leaving the agent under-informed for safe and effective use.

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 description adds minimal meaning beyond the input schema, which has 0% coverage but only one parameter ('workflowId'). It clarifies that 'workflowId' is used to identify the workflow to delete, but doesn't specify format (e.g., UUID) or sourcing (e.g., from 'get_workflow_summary'). With low schema coverage but only one parameter, the baseline is met without compensating fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('an n8n workflow by ID'), making the purpose immediately understandable. It distinguishes from siblings like 'create_workflow' or 'update_workflow' by specifying deletion, though it doesn't explicitly contrast with other destructive operations like 'remove' tools that might exist elsewhere.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing workflow ID), consequences (e.g., irreversible deletion), or when to choose deletion over archiving or other options, leaving the agent to infer usage from context alone.

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/Souzix76/n8n-workflow-tester-safe'

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