Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

List n8n Tags

n8n_list_tags
Read-onlyIdempotent

Retrieve all available tags for organizing workflows in n8n, with pagination support for managing large collections.

Instructions

List all tags available for organizing workflows.

Args:

  • limit (number): Maximum results (default: 100)

  • cursor (string, optional): Pagination cursor

Returns: List of tags with id and name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results to return
cursorNoPagination cursor

Implementation Reference

  • The handler function for 'n8n_list_tags', which calls the '/tags' API endpoint to list all available tags.
    async (params: z.infer<typeof ListTagsSchema>) => {
      const queryParams: Record<string, unknown> = { limit: params.limit };
      if (params.cursor) queryParams.cursor = params.cursor;
      
      const response = await get<N8nPaginatedResponse<N8nTag>>('/tags', queryParams);
      
      const formatted = response.data.map(formatTag).join('\n');
      const output = {
        count: response.data.length,
        tags: response.data,
        nextCursor: response.nextCursor
      };
      
      let text = `Found ${response.data.length} tag(s):\n\n${formatted}`;
      if (response.nextCursor) {
        text += `\n\n_More results available. Use cursor: ${response.nextCursor}_`;
      }
      
      return {
        content: [{ type: 'text', text }],
        structuredContent: output
      };
    }
  • Registration of the 'n8n_list_tags' tool with the MCP server, defining its schema, title, and description.
      server.registerTool(
        'n8n_list_tags',
        {
          title: 'List n8n Tags',
          description: `List all tags available for organizing workflows.
    
    Args:
      - limit (number): Maximum results (default: 100)
      - cursor (string, optional): Pagination cursor
    
    Returns:
      List of tags with id and name.`,
          inputSchema: ListTagsSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
Behavior4/5

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

Annotations already indicate this is a read-only, non-destructive, idempotent operation with a closed world, so the description doesn't need to repeat safety aspects. It adds value by specifying the return format ('List of tags with id and name') and mentioning pagination via the 'cursor' parameter, which provides useful behavioral context beyond the annotations.

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 well-structured and front-loaded with the core purpose in the first sentence. The 'Args' and 'Returns' sections are concise and directly relevant, with no redundant information. Every sentence serves a clear purpose, making it efficient and easy to parse.

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

Completeness4/5

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

Given the tool's low complexity (2 parameters, 100% schema coverage, no output schema), the description is mostly complete. It covers the purpose, parameters, and return format. However, it lacks details on error handling or rate limits, which could be useful for an agent. With annotations providing safety context, this is a minor gap.

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

Parameters3/5

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

Schema description coverage is 100%, with clear documentation for both parameters ('limit' and 'cursor'), so the description doesn't need to add parameter details. The description mentions pagination and default limit, but these are already covered in the schema. Baseline 3 is appropriate as the schema handles parameter semantics effectively.

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

Purpose5/5

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

The description clearly states the specific action ('List all tags') and resource ('available for organizing workflows'), making the purpose immediately evident. It distinguishes this tool from siblings like 'n8n_get_tag' (which retrieves a single tag) and 'n8n_create_tag'/'n8n_delete_tag'/'n8n_update_tag' (which modify tags), establishing its role as a bulk retrieval operation.

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

Usage Guidelines3/5

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

The description implies usage when needing to see all available tags, but provides no explicit guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as whether tags must exist or if authentication is required, nor does it compare to other listing tools (e.g., 'n8n_list_workflows') for context.

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

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

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