n8n_delete_workflow
Permanently delete a workflow and all associated execution history. Ensure the workflow is deactivated first as this action cannot be undone.
Instructions
Permanently delete a workflow and all associated execution history. This action cannot be undone. Workflow must be deactivated first. Use with caution.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Workflow ID to permanently delete |
Implementation Reference
- src/n8n-client.ts:76-78 (handler)The actual handler method that executes the delete workflow logic. Makes an authenticated DELETE request to the n8n API endpoint /api/v1/workflows/{id}
async deleteWorkflow(id: string) { return this.request(`${this.apiBase}/workflows/${id}`, { method: 'DELETE' }); } - src/tools.ts:85-101 (schema)Tool schema definition including name, description, input schema (requires 'id' parameter), and annotations marking it as destructive and idempotent
name: 'n8n_delete_workflow', description: 'Permanently delete a workflow and all associated execution history. This action cannot be undone. Workflow must be deactivated first. Use with caution.', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Workflow ID to permanently delete' }, }, required: ['id'], }, annotations: { title: 'Delete Workflow', readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true, }, }, - src/server.ts:33-34 (registration)Registration point where the tool name 'n8n_delete_workflow' is mapped to the client.deleteWorkflow handler method
case 'n8n_delete_workflow': return client.deleteWorkflow(args.id);