Skip to main content
Glama

create-tag

Add a new tag to organize and categorize workflows in your n8n instance. Specify the tag name and client ID to create custom labels for better workflow management.

Instructions

Create a new tag in your instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
nameYes

Implementation Reference

  • Handler for the 'create-tag' tool execution. Validates client, calls N8nClient.createTag, and returns success or error response.
    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
        };
      }
    }
  • Input schema definition for the 'create-tag' tool, specifying clientId and name parameters.
    inputSchema: {
      type: "object",
      properties: {
        clientId: { type: "string" },
        name: { type: "string" }
      },
      required: ["clientId", "name"]
    }
  • src/index.ts:735-745 (registration)
    Registration of the 'create-tag' tool in the tools list returned by ListToolsRequest handler.
      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 helper method that performs the actual API call to create a tag via POST /tags.
    async createTag(name: string): Promise<N8nTag> {
      return this.makeRequest<N8nTag>('/tags', {
        method: 'POST',
        body: JSON.stringify({ name }),
      });
    }
  • TypeScript interface defining the structure of a N8nTag returned by the createTag API.
    interface N8nTag {
      id: string;
      name: string;
      createdAt?: string;
      updatedAt?: string;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states this is a creation operation, implying it's a mutation, but doesn't disclose behavioral traits like required permissions, whether it's idempotent, error conditions, or what happens on success. The description is minimal and lacks critical operational details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's appropriately sized for a simple tool and front-loaded with the key action. Every part of the sentence contributes to the basic purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't cover parameter meanings, behavioral expectations, or output details, leaving significant gaps for an AI agent to understand and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It adds no meaning beyond the schema, failing to explain what 'clientId' and 'name' represent, their formats, or constraints. With 2 required parameters and no parameter info in the description, this is inadequate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Create') and resource ('new tag'), which provides a basic purpose. However, it's vague about what a 'tag' represents in this context and doesn't differentiate from sibling tools like 'update-tag' or 'delete-tag'. The phrase 'in your instance' adds some context but remains generic.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, when not to use it, or how it relates to sibling tools like 'update-tag', 'delete-tag', or 'get-tag'. There's only an implicit context from the action 'Create'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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