Skip to main content
Glama

get-tag

Retrieve a specific tag by ID from n8n workflows using the MCP server for secure integration with Large Language Models.

Instructions

Retrieve a specific tag by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes

Implementation Reference

  • Executes the 'get-tag' tool by retrieving the N8nClient instance and calling its getTag method to fetch the tag by ID, returning the JSON stringified result.
    case "get-tag": { const { clientId, id } = args as { clientId: string; id: string }; const client = clients.get(clientId); if (!client) { return { content: [{ type: "text", text: "Client not initialized. Please run init-n8n first.", }], isError: true }; } try { const tag = await client.getTag(id); return { content: [{ type: "text", text: JSON.stringify(tag, null, 2), }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
  • src/index.ts:759-769 (registration)
    Registers the 'get-tag' tool in the list of available tools, including its name, description, and input schema.
    name: "get-tag", description: "Retrieve a specific tag by ID.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, id: { type: "string" } }, required: ["clientId", "id"] } },
  • Defines the input schema for the 'get-tag' tool, requiring clientId and id.
    inputSchema: { type: "object", properties: { clientId: { type: "string" }, id: { type: "string" } }, required: ["clientId", "id"] }
  • N8nClient method that makes the API request to retrieve a tag by ID.
    async getTag(id: string): Promise<N8nTag> { return this.makeRequest<N8nTag>(`/tags/${id}`);
  • TypeScript interface defining the structure of a N8nTag returned by the getTag method.
    interface N8nTag { id: string; name: string; createdAt?: string; updatedAt?: string; }

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

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