delete_tag
Remove tags from n8n workflows by specifying the tag ID to maintain organized workflow management and categorization.
Instructions
Delete a tag by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/index.ts:531-534 (handler)The MCP tool handler for 'delete_tag'. Parses arguments, calls N8nClient.deleteTag(id), and returns standardized MCP success response.private async handleDeleteTag(args: { id: string | number }) { await this.n8nClient.deleteTag(args.id); return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess({ id: args.id }), null, 2) }] }; }
- src/n8n-client.ts:705-707 (helper)N8nClient helper method implementing the core logic: DELETE /api/v1/tags/{id} via axios.async deleteTag(id: string | number): Promise<void> { await this.api.delete(`/tags/${id}`); }
- src/index.ts:308-309 (registration)Dispatch routing in CallToolRequestSchema handler: switch case for 'delete_tag' invokes the tool handler.case 'delete_tag': return await this.handleDeleteTag(request.params.arguments as { id: string | number });
- src/index.ts:206-206 (schema)Tool schema definition in ListToolsRequestSchema response: defines input as object with required 'id' (string or number).{ name: 'delete_tag', description: 'Delete a tag by ID', inputSchema: { type: 'object', properties: { id: { oneOf: [{ type: 'string' }, { type: 'number' }] } }, required: ['id'] } },