Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

List n8n Workflows

n8n_list_workflows
Read-onlyIdempotent

Retrieve and filter workflows from n8n with options for active status, tags, name, project, and pagination to manage automation processes.

Instructions

List all workflows in the n8n instance with optional filtering.

Args:

  • active (boolean, optional): Filter by active status

  • tags (string, optional): Filter by tag IDs (comma-separated)

  • name (string, optional): Filter by name (partial match)

  • projectId (string, optional): Filter by project ID

  • limit (number): Maximum results (default: 100, max: 250)

  • cursor (string, optional): Pagination cursor from previous response

Returns: List of workflows with id, name, active status, created/updated timestamps, and tags. Includes nextCursor for pagination if more results exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activeNoFilter by active status
tagsNoFilter by tag IDs (comma-separated)
nameNoFilter by name (partial match)
projectIdNoFilter by project ID
limitNoMaximum results to return
cursorNoPagination cursor

Implementation Reference

  • The handler function for n8n_list_workflows. It constructs query parameters, calls the API via a service client, and formats the response for the MCP client.
    async (params: z.infer<typeof ListWorkflowsSchema>) => {
      const queryParams: Record<string, unknown> = { limit: params.limit };
      if (params.active !== undefined) queryParams.active = params.active;
      if (params.tags) queryParams.tags = params.tags;
      if (params.name) queryParams.name = params.name;
      if (params.projectId) queryParams.projectId = params.projectId;
      if (params.cursor) queryParams.cursor = params.cursor;
      
      const response = await get<N8nPaginatedResponse<N8nWorkflowListItem>>('/workflows', queryParams);
      
      const formatted = response.data.map(formatWorkflow).join('\n\n---\n\n');
      const output = {
        count: response.data.length,
        workflows: response.data,
        nextCursor: response.nextCursor
      };
      
      let text = `Found ${response.data.length} workflow(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_workflows tool, specifying its schema and documentation.
      server.registerTool(
        'n8n_list_workflows',
        {
          title: 'List n8n Workflows',
          description: `List all workflows in the n8n instance with optional filtering.
    
    Args:
      - active (boolean, optional): Filter by active status
      - tags (string, optional): Filter by tag IDs (comma-separated)
      - name (string, optional): Filter by name (partial match)
      - projectId (string, optional): Filter by project ID
      - limit (number): Maximum results (default: 100, max: 250)
      - cursor (string, optional): Pagination cursor from previous response
    
    Returns:
      List of workflows with id, name, active status, created/updated timestamps, and tags.
      Includes nextCursor for pagination if more results exist.`,
          inputSchema: ListWorkflowsSchema,
          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 declare this as read-only, non-destructive, and idempotent, which the description doesn't contradict. The description adds valuable behavioral context beyond annotations by specifying the return format (list with id, name, active status, timestamps, tags) and pagination behavior (nextCursor for continuation), which helps the agent understand what to expect from the operation.

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

Conciseness4/5

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

The description is well-structured with clear sections (purpose statement, Args, Returns) and uses bullet points for readability. While efficient, the 'Args' section could be more concise since it largely duplicates schema information, and the initial purpose statement could be slightly more specific about differentiation from siblings.

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 annotations cover safety aspects (read-only, non-destructive) and the description details return values and pagination, this provides adequate context for a listing tool. The lack of an output schema is compensated by the Returns section. However, it could better address sibling tool relationships and edge cases (e.g., what happens when no filters match).

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?

With 100% schema description coverage, the input schema already documents all 6 parameters thoroughly. The description's 'Args' section essentially repeats what's in the schema without adding significant semantic context (e.g., explaining relationships between filters or typical use cases for each). This meets the baseline expectation when schema coverage is complete.

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 ('List all workflows') and resource ('in the n8n instance'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'n8n_get_workflow' (singular) or 'n8n_list_executions', which might cause some ambiguity about when to use this specific listing tool versus others.

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 through the mention of 'optional filtering' and pagination, suggesting this is for retrieving multiple workflows with filtering capabilities. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'n8n_get_workflow' (for single workflow) or 'n8n_list_executions' (for workflow runs), leaving some ambiguity about the optimal context for selection.

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