Skip to main content
Glama

delete-tag

Remove a specific tag by its ID from the n8n MCP Server to manage workflow organization and data categorization.

Instructions

Delete a tag by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes

Implementation Reference

  • Handler function that executes the delete-tag tool: validates clientId, retrieves N8nClient, calls client.deleteTag(id), and returns success/error response.
    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
        };
      }
    }
  • Input schema for the delete-tag tool, defining required clientId and id parameters.
      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:784-794 (registration)
    Registration of the delete-tag tool in the list of available tools returned by ListToolsRequestSchema.
      name: "delete-tag",
      description: "Delete a tag by ID.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          id: { type: "string" }
        },
        required: ["clientId", "id"]
      }
    },
  • N8nClient helper method that makes the DELETE API request to /tags/{id} to delete the tag.
    async deleteTag(id: string): Promise<N8nTag> {
      return this.makeRequest<N8nTag>(`/tags/${id}`, {
        method: 'DELETE',
      });
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/illuminaresolutions/n8n-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server