get_tag
Retrieve specific workflow tags by ID to organize and categorize n8n automation workflows for better management and filtering.
Instructions
Get a specific tag by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/index.ts:515-517 (handler)MCP tool handler for 'get_tag': receives arguments, calls n8nClient.getTag(id), formats success response as JSON.private async handleGetTag(args: { id: string | number }) { const tag = await this.n8nClient.getTag(args.id); return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess(tag), null, 2) }] };
- src/n8n-client.ts:628-631 (helper)Core N8nClient method implementing getTag: makes HTTP GET request to /api/v1/tags/{id} and returns the tag object.async getTag(id: string | number): Promise<N8nTag> { const response = await this.api.get<N8nApiResponse<N8nTag>>(`/tags/${id}`); return response.data.data; }
- src/index.ts:203-203 (registration)Tool registration in ListTools response: defines name, description, and input schema for 'get_tag'.{ name: 'get_tag', description: 'Get a specific tag by ID', inputSchema: { type: 'object', properties: { id: { oneOf: [{ type: 'string' }, { type: 'number' }] } }, required: ['id'] } },
- src/index.ts:302-303 (registration)Dispatcher switch case that routes 'get_tag' tool calls to the handleGetTag method.case 'get_tag': return await this.handleGetTag(request.params.arguments as { id: string | number });