Skip to main content
Glama

get_tag

Retrieve a specific tag by its ID from n8n workflows to organize and categorize automation processes.

Instructions

Get a specific tag by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • MCP server handler method for the 'get_tag' tool. Extracts the tag ID from arguments and delegates to N8nClient.getTag, then formats the response.
    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/index.ts:302-303 (registration)
    Dispatch case in CallToolRequestHandler that routes 'get_tag' tool calls to the handleGetTag method.
    case 'get_tag': return await this.handleGetTag(request.params.arguments as { id: string | number });
  • Tool registration in ListToolsResponse including name, description, and input schema requiring an 'id' (string or number).
    { name: 'get_tag', description: 'Get a specific tag by ID', inputSchema: { type: 'object', properties: { id: { oneOf: [{ type: 'string' }, { type: 'number' }] } }, required: ['id'] } },
  • Core N8nClient method implementing the API call to retrieve a specific tag by ID from the n8n /api/v1/tags/{id} endpoint.
    async getTag(id: string | number): Promise<N8nTag> { const response = await this.api.get<N8nApiResponse<N8nTag>>(`/tags/${id}`); 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