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
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | ||
| name | Yes |
Implementation Reference
- src/index.ts:520-523 (handler)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) }] }; }
- src/index.ts:204-204 (schema)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 });
- src/n8n-client.ts:633-636 (helper)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; }