Skip to main content
Glama
nikolausm

n8n MCP Server

by nikolausm

list_workflows

Retrieve a list of n8n workflows with optional filters for active status, tags, and pagination using cursor.

Instructions

List all n8n workflows with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activeNoFilter by active status
limitNoMaximum number of workflows to return
cursorNoCursor for pagination
tagsNoFilter by tags

Implementation Reference

  • Handler function on N8nClient class that makes GET request to /api/v1/workflows with optional filtering parameters (active, limit, cursor, tags).
    async listWorkflows(params?: {
      active?: boolean;
      limit?: number;
      cursor?: string;
      tags?: string[];
    }) {
      const response = await this.client.get("/api/v1/workflows", { params });
      return response.data;
  • Zod schema for validating list_workflows input parameters (active, limit, cursor, tags).
    const ListWorkflowsSchema = z.object({
      active: z.boolean().optional(),
      limit: z.number().optional().default(10),
      cursor: z.string().optional(),
      tags: z.array(z.string()).optional(),
    });
  • src/tools.ts:3-29 (registration)
    Tool registration definition with name, description, and JSON Schema inputSchema for the list_workflows tool.
    {
      name: "list_workflows",
      description: "List all n8n workflows with optional filtering",
      inputSchema: {
        type: "object",
        properties: {
          active: {
            type: "boolean",
            description: "Filter by active status",
          },
          limit: {
            type: "number",
            description: "Maximum number of workflows to return",
            default: 10,
          },
          cursor: {
            type: "string",
            description: "Cursor for pagination",
          },
          tags: {
            type: "array",
            items: { type: "string" },
            description: "Filter by tags",
          },
        },
      },
    },
  • Router case in handleToolCall that validates args via ListWorkflowsSchema and delegates to client.listWorkflows().
    case "list_workflows": {
      const params = ListWorkflowsSchema.parse(args);
      return await client.listWorkflows(params);
    }
Behavior2/5

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

Annotations are absent, so the description bears full responsibility for behavioral disclosure. It only states 'list' without clarifying whether the operation is read-only, requires authentication, or has rate limits. No information about return format or side effects.

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 a single concise sentence, efficient and to the point. However, it could be slightly expanded to include basic context without losing conciseness.

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?

With no output schema and four parameters, the description does not explain the response format, pagination behavior (despite a cursor parameter), or what 'all' means in terms of scope. This is insufficient for an agent to fully understand the tool's behavior.

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 coverage is 100% and each parameter has a description in the schema. The description adds no additional meaning beyond the schema, which is adequate but does not enhance understanding.

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 verb 'list' and resource 'n8n workflows' with optional filtering, making the purpose obvious. However, it does not differentiate from the sibling tool 'search_workflows', which may have overlapping functionality.

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?

No guidance is provided on when to use this tool versus alternatives like 'search_workflows', 'get_workflow', or 'get_executions'. The description lacks context such as expected use cases or limitations.

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

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