Skip to main content
Glama

n8n_delete_workflow

Permanently delete a workflow from n8n. This action cannot be undone. Provide the workflow ID to remove it.

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 executes the n8n_delete_workflow tool. Validates the workflow ID from input arguments, calls the N8nApiClient's deleteWorkflow method, and returns a JSON success message.
    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), }, ], }; },
  • Tool registration entry in workflowTools array, defining the name, description, and input schema (requiring 'id' string) for MCP tool discovery and validation.
    { 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)
    Handler dispatch logic in the MCP server that routes calls to workflowToolHandlers (including n8n_delete_workflow) when the tool name matches.
    if (name in workflowToolHandlers) { const handler = workflowToolHandlers[name as keyof typeof workflowToolHandlers]; return handler(client, args); }
  • Input schema definition specifying the required 'id' parameter of type string for the n8n_delete_workflow tool.
    inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'The workflow ID to delete', }, }, required: ['id'], },

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