Skip to main content
Glama

create_tag

Create new tags in n8n workflows to organize and categorize automation processes. Define tag names and colors for better workflow management and filtering.

Instructions

Create a new tag

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNo
nameYes

Implementation Reference

  • MCP tool handler for 'create_tag' that delegates to N8nClient.createTag and formats the JSON response for MCP.
    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) }] }; }
  • Input schema definition for the create_tag tool, specifying required 'name' string and optional 'color' string.
    { name: 'create_tag', description: 'Create a new tag', inputSchema: { type: 'object', properties: { name: { type: 'string' }, color: { type: 'string' } }, required: ['name'] } },
  • src/index.ts:304-305 (registration)
    Registration of the create_tag handler in the CallToolRequestSchema switch statement.
    case 'create_tag': return await this.handleCreateTag(request.params.arguments as { name: string; color?: string });
  • N8nClient helper method implementing the actual HTTP POST to /api/v1/tags to create a new tag in n8n.
    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