Skip to main content
Glama

get-tag

Retrieve a specific tag by ID using client and ID parameters in the MCP-N8N server. Simplify data access and management with this targeted query tool.

Instructions

Retrieve a specific tag by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idYes

Implementation Reference

  • Primary MCP tool handler for 'get-tag'. Retrieves the N8nClient by clientId, calls getTag(id), formats response as JSON or error.
    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
        };
      }
    }
  • N8nClient helper method implementing the core logic: API GET request to /tags/{id}.
    async getTag(id: string): Promise<N8nTag> {
      return this.makeRequest<N8nTag>(`/tags/${id}`);
    }
  • src/index.ts:759-769 (registration)
    Tool registration entry in ListTools response, defining 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"]
      }
    },
  • TypeScript interface defining the structure of a N8nTag object used in getTag response.
    interface N8nTag {
      id: string;
      name: string;
      createdAt?: string;
      updatedAt?: string;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a retrieval operation, implying read-only behavior, but doesn't mention authentication requirements, rate limits, error conditions, or response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with no wasted words. It's appropriately sized for a simple retrieval tool and front-loads the core purpose effectively.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a read operation with 2 required parameters), lack of annotations, and no output schema, the description is insufficient. It doesn't explain parameter meanings, return values, error handling, or how it differs from similar tools, leaving the agent with inadequate context for proper use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage for its two parameters (clientId and id), and the description doesn't explain what these parameters mean or how they're used. It mentions 'ID' generically but doesn't clarify if this refers to the 'id' parameter or something else, failing to compensate for the schema's lack of documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Retrieve') and resource ('a specific tag by ID'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'list-tags' or 'get-workflow-tags', which would require explicit comparison to achieve a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'list-tags' or 'get-workflow-tags'. It lacks context about prerequisites (e.g., needing a tag ID) or exclusions, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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

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