Skip to main content
Glama

create-tag

Generate and manage tags in your n8n instance by specifying a client ID and tag name, enabling organized workflow and execution tracking for improved operational clarity.

Instructions

Create a new tag in your instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
nameYes

Implementation Reference

  • Handler for the 'create-tag' tool that retrieves the N8nClient and calls its createTag method with the provided name, returning the created tag or error.
    const { clientId, name } = args as { clientId: string; name: 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.createTag(name); return { content: [{ type: "text", text: `Successfully created 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:735-745 (registration)
    Registration of the 'create-tag' tool in the ListTools response, defining its name, description, and input schema.
    name: "create-tag", description: "Create a new tag in your instance.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, name: { type: "string" } }, required: ["clientId", "name"] } },
  • Input schema for the 'create-tag' tool specifying clientId and name parameters.
    inputSchema: { type: "object", properties: { clientId: { type: "string" }, name: { type: "string" } }, required: ["clientId", "name"] }
  • N8nClient helper method that performs the POST request to /tags endpoint to create a new tag.
    async createTag(name: string): Promise<N8nTag> { return this.makeRequest<N8nTag>('/tags', { method: 'POST', body: JSON.stringify({ name }), }); }

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