Skip to main content
Glama

create_tag

Create and manage tags in n8n workflows to organize and categorize automation processes. Define tag names and colors for better workflow identification.

Instructions

Create a new tag

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
colorNo

Implementation Reference

  • src/index.ts:204-204 (registration)
    Tool registration including name, description, and input schema for create_tag
    { name: 'create_tag', description: 'Create a new tag', inputSchema: { type: 'object', properties: { name: { type: 'string' }, color: { type: 'string' } }, required: ['name'] } },
  • MCP tool handler that receives arguments, calls n8nClient.createTag, and returns formatted JSON response
    private async handleCreateTag(args: { name: string; color?: string }) { const tag = await this.n8nClient.createTag(args); return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess(tag), null, 2) }] };
  • Switch case dispatching create_tag tool calls to the specific handler method
    case 'create_tag': return await this.handleCreateTag(request.params.arguments as { name: string; color?: string });
  • Core helper method that performs the actual POST request to n8n API endpoint /tags to create the tag
    async createTag(tag: Omit<N8nTag, 'id' | 'createdAt' | 'updatedAt'>): Promise<N8nTag> { const response = await this.api.post<N8nApiResponse<N8nTag>>('/tags', tag); return response.data.data;

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

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