Skip to main content
Glama

create-tag

Generate new tags within your instance using client ID and tag name to organize and categorize data efficiently in the MCP-N8N server.

Instructions

Create a new tag in your instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
nameYes

Implementation Reference

  • MCP tool handler for 'create-tag'. Validates clientId, retrieves N8nClient instance, calls client.createTag(name), and returns the created tag or error.
    case "create-tag": { 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 }; } }
  • Tool specification including name, description, and input schema definition for 'create-tag' in the ListTools response.
    name: "create-tag", description: "Create a new tag in your instance.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, name: { type: "string" } }, required: ["clientId", "name"] } },
  • N8nClient method that performs the actual API call to create a tag via POST /tags with the tag name.
    async createTag(name: string): Promise<N8nTag> { return this.makeRequest<N8nTag>('/tags', { method: 'POST', body: JSON.stringify({ name }), }); }
  • Type definition for N8nTag returned by the createTag API call.
    interface N8nTag { id: string; name: string; createdAt?: string; updatedAt?: string; }

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/fellipesaraiva88/n8n-mcp-server'

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