delete-tag
Remove a specific tag by its ID from the n8n MCP Server to manage workflows, executions, and settings efficiently. Requires clientId and tag ID as inputs.
Instructions
Delete a tag by ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clientId | Yes | ||
| id | Yes |
Implementation Reference
- src/index.ts:1822-1852 (handler)Handler for the 'delete-tag' tool in the CallToolRequestSchema switch statement. Retrieves the N8nClient instance and calls deleteTag(id) on it.case "delete-tag": { const { clientId, id } = args as { clientId: string; id: string }; const client = clients.get(clientId); if (!client) { return { content: [{ type: "text", text: "Client not initialized. Please run init-n8n first.", }], isError: true }; } try { const tag = await client.deleteTag(id); return { content: [{ type: "text", text: `Successfully deleted tag:\n${JSON.stringify(tag, null, 2)}`, }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
- src/index.ts:324-328 (helper)Core implementation of deleting a tag via N8n API in N8nClient class, calls makeRequest with DELETE /tags/{id}.async deleteTag(id: string): Promise<N8nTag> { return this.makeRequest<N8nTag>(`/tags/${id}`, { method: 'DELETE', }); }
- src/index.ts:783-794 (registration)Tool registration in the list-tools response, including name, description, and input schema.{ name: "delete-tag", description: "Delete a tag by ID.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, id: { type: "string" } }, required: ["clientId", "id"] } },
- src/index.ts:786-794 (schema)Input schema definition for the 'delete-tag' tool.inputSchema: { type: "object", properties: { clientId: { type: "string" }, id: { type: "string" } }, required: ["clientId", "id"] } },