n8n_delete_workflow
Remove a workflow from n8n by specifying its ID to manage automation processes and maintain organized workflow libraries.
Instructions
Delete a workflow
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "n8n_delete_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Workflow ID to delete |
Implementation Reference
- src/n8n-client.ts:71-74 (handler)The actual API call to delete a workflow.
async deleteWorkflow(id: string): Promise<any> { const response = await this.client.delete(`/workflows/${id}`); return response.data; } - src/index.ts:91-97 (handler)MCP tool handler logic for n8n_delete_workflow.
case 'n8n_delete_workflow': { if (!args?.id) throw new Error('id is required'); const result = await n8nClient.deleteWorkflow(args.id as string); return { content: [{ type: 'text', text: `Workflow ${args.id as string} deleted successfully` }], }; } - src/index.ts:498-505 (schema)Tool registration and input schema for n8n_delete_workflow.
name: 'n8n_delete_workflow', description: 'Delete a workflow', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Workflow ID to delete' }, }, required: ['id'],