Skip to main content
Glama
nikolausm

n8n MCP Server

by nikolausm

delete_workflow

Delete a n8n workflow by providing its unique ID, removing it permanently from your instance.

Instructions

Delete a workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe ID of the workflow to delete

Implementation Reference

  • Tool registration/schema for 'delete_workflow': defines the tool name, description, and input schema (requiring workflowId as a string).
    {
      name: "delete_workflow",
      description: "Delete a workflow",
      inputSchema: {
        type: "object",
        properties: {
          workflowId: {
            type: "string",
            description: "The ID of the workflow to delete",
          },
        },
        required: ["workflowId"],
      },
    },
  • Handler for 'delete_workflow': parses args using WorkflowIdSchema (z.object with workflowId string), then calls client.deleteWorkflow(workflowId).
    case "delete_workflow": {
      const { workflowId } = WorkflowIdSchema.parse(args);
      return await client.deleteWorkflow(workflowId);
    }
  • N8nClient.deleteWorkflow() method: makes an HTTP DELETE call to /api/v1/workflows/{id} and returns a success message.
    async deleteWorkflow(id: string) {
      await this.client.delete(`/api/v1/workflows/${id}`);
      return { success: true, message: `Workflow ${id} deleted successfully` };
    }
  • WorkflowIdSchema Zod schema used for validation: expects a string property 'workflowId'.
    const WorkflowIdSchema = z.object({
      workflowId: z.string(),
    });
  • src/index.ts:37-40 (registration)
    MCP server registration: CallToolRequestSchema handler receives tool calls and dispatches to handleToolCall, which routes 'delete_workflow' to the correct case.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      try {
        const { name, arguments: args } = request.params;
        const result = await handleToolCall(name, args, n8nClient);
Behavior1/5

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

With no annotations, the description must disclose behavioral traits. It only says 'Delete a workflow' without mentioning irreversibility, side effects (e.g., cascading deletes), or required permissions. This is severely lacking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is only four words, which is extremely concise. However, it sacrifices necessary detail for brevity, making it under-specified. It could be slightly expanded to include key context without being verbose.

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

Completeness1/5

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

Given the complexity of a deletion action (irreversible, potential dependencies), the description is far from complete. No annotations, output schema, or additional context are provided, leaving the agent ill-informed.

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 coverage is 100% for the single parameter, and the description does not add any meaning beyond the schema's own 'The ID of the workflow to delete'. Baseline score of 3 applies.

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 (workflow), making the primary purpose obvious. However, it does not distinguish 'delete' from sibling 'deactivate_workflow', which could cause confusion.

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?

No guidance is provided on when to use delete versus deactivate or other alternatives. The agent has no context to decide between these similar tools.

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/nikolausm/n8n-mcp-server'

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