delete_tag
Delete a tag by its ID to remove it from workflow organization in n8n.
Instructions
Delete a tag
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tagId | Yes | The ID of the tag to delete |
Implementation Reference
- src/handlers.ts:151-154 (handler)Handler for the 'delete_tag' tool. Parses tagId from args using TagIdSchema, then calls client.deleteTag(tagId).
case "delete_tag": { const { tagId } = TagIdSchema.parse(args); return await client.deleteTag(tagId); } - src/handlers.ts:60-62 (schema)Zod schema for delete_tag input validation: requires a 'tagId' string.
const TagIdSchema = z.object({ tagId: z.string(), }); - src/tools.ts:291-304 (registration)Tool registration definition for delete_tag with name, description, and inputSchema (requires tagId).
{ name: "delete_tag", description: "Delete a tag", inputSchema: { type: "object", properties: { tagId: { type: "string", description: "The ID of the tag to delete", }, }, required: ["tagId"], }, }, - src/n8n-client.ts:154-157 (helper)Actual API call implementation: sends DELETE /api/v1/tags/{id} via axios and returns a success message.
async deleteTag(id: string) { await this.client.delete(`/api/v1/tags/${id}`); return { success: true, message: `Tag ${id} deleted successfully` }; }