Skip to main content
Glama

n8n_list_workflows

Retrieve workflow IDs, names, and active status from your n8n instance to monitor and manage automation processes.

Instructions

List all workflows in the n8n instance. Returns workflow IDs, names, and active status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of workflows to return (default: 100)
activeNoFilter by active status (true/false)

Implementation Reference

  • The main handler function for the 'n8n_list_workflows' tool. It uses the N8nApiClient to list workflows with optional filters and returns a formatted JSON response.
    n8n_list_workflows: async (
      client: N8nApiClient,
      args: Record<string, unknown>
    ): Promise<ToolResult> => {
      const result = await client.listWorkflows({
        limit: args.limit as number | undefined,
        active: args.active as boolean | undefined,
      });
    
      const workflows = result.data.map((w) => ({
        id: w.id,
        name: w.name,
        active: w.active,
        createdAt: w.createdAt,
        updatedAt: w.updatedAt,
        nodeCount: w.nodes?.length || 0,
      }));
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify({
              count: workflows.length,
              workflows,
              hasMore: !!result.nextCursor,
            }, null, 2),
          },
        ],
      };
    },
  • The tool definition including name, description, and input schema for validation.
    {
      name: 'n8n_list_workflows',
      description: 'List all workflows in the n8n instance. Returns workflow IDs, names, and active status.',
      inputSchema: {
        type: 'object',
        properties: {
          limit: {
            type: 'number',
            description: 'Maximum number of workflows to return (default: 100)',
          },
          active: {
            type: 'boolean',
            description: 'Filter by active status (true/false)',
          },
        },
      },
    },
  • src/server.ts:122-125 (registration)
    Registration and dispatch logic for workflow tool handlers, including n8n_list_workflows, in the MCP server.
    if (name in workflowToolHandlers) {
      const handler = workflowToolHandlers[name as keyof typeof workflowToolHandlers];
      return handler(client, args);
    }
  • src/server.ts:60-64 (registration)
    MCP server registration of all tool definitions (including n8n_list_workflows via allTools) for the list tools endpoint.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: allTools,
      };
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the return format (IDs, names, active status) which is helpful, but doesn't disclose pagination behavior (implied by limit parameter), authentication requirements, rate limits, error conditions, or whether this is a read-only operation (though 'List' suggests it).

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?

Two concise sentences with zero waste: the first states the action and scope, the second specifies the return format. Every word earns its place, and the most important information (what it does) is front-loaded.

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

Completeness3/5

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

For a read operation with 2 parameters and 100% schema coverage, the description provides adequate purpose and return format. However, without annotations or output schema, it lacks details on authentication, error handling, pagination beyond the limit parameter, and explicit safety assurances (read-only nature).

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%, so the schema fully documents both parameters (limit and active). The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 for adequate coverage through structured data alone.

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 workflows'), target resource ('in the n8n instance'), and scope ('Returns workflow IDs, names, and active status'). It distinguishes from siblings like n8n_get_workflow (single workflow) and n8n_list_executions (different resource).

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

Usage Guidelines4/5

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

The description implies usage context by specifying it returns 'all workflows' with certain fields, suggesting it's for browsing/overview purposes. However, it doesn't explicitly state when to use this versus alternatives like n8n_get_workflow for detailed info or n8n_list_executions for execution data.

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/alicankiraz1/cursor-n8n-builder'

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