Skip to main content
Glama
AutomateLab-tech

automatelab-n8n-mcp

n8n_list_workflows

Retrieve workflows from a live n8n instance with optional filters for active status, tags, or name. Returns IDs, names, node counts, tags, and last update time.

Instructions

List workflows from a live n8n instance (requires N8N_API_URL + N8N_API_KEY env vars). Returns id, name, active, nodeCount, updatedAt, tags. Filter by active, tags, name. Use this when the user asks 'what workflows do I have?' or before n8n_get_workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activeNoFilter by active status. Omit to return both.
tagsNoComma-separated tag names to filter by.
nameNoFilter by exact workflow name.
limitNoPage size (n8n default: 100, max: 250).

Implementation Reference

  • The async function `listWorkflows` that executes the tool logic. Parses arguments with Zod, builds query params (active/tags/name/limit), makes a GET /workflows call to the n8n API, and returns a summarized JSON result with id, name, active, nodeCount, updatedAt, and tags.
    export async function listWorkflows(rawArgs: unknown) {
    	const cfg = getConfig();
    	if ("error" in cfg) return textResult(cfg.error);
    	const args = listWorkflowsZod.parse(rawArgs ?? {});
    	const params = new URLSearchParams();
    	if (args.active !== undefined) params.set("active", String(args.active));
    	if (args.tags) params.set("tags", args.tags);
    	if (args.name) params.set("name", args.name);
    	if (args.limit) params.set("limit", String(args.limit));
    	const qs = params.toString() ? `?${params}` : "";
    	const r = await call(cfg, "GET", `/workflows${qs}`);
    	if (!r.ok) return textResult(r.error);
    	const data = r.data as { data?: unknown[] } | unknown[];
    	const arr = Array.isArray(data) ? data : data?.data ?? [];
    	const summary = (arr as Array<Record<string, unknown>>).map((w) => ({
    		id: w.id,
    		name: w.name,
    		active: w.active,
    		nodeCount: Array.isArray(w.nodes) ? (w.nodes as unknown[]).length : undefined,
    		updatedAt: w.updatedAt,
    		tags: Array.isArray(w.tags)
    			? (w.tags as Array<{ name?: string }>).map((t) => t.name).filter(Boolean)
    			: undefined,
    	}));
    	return jsonResult(summary);
    }
  • The `listWorkflowsInputSchema` JSON schema defining input properties (active, tags, name, limit) for the n8n_list_workflows tool.
    export const listWorkflowsInputSchema = {
    	type: "object",
    	properties: {
    		active: {
    			type: "boolean",
    			description: "Filter by active status. Omit to return both.",
    		},
    		tags: {
    			type: "string",
    			description: "Comma-separated tag names to filter by.",
    		},
    		name: {
    			type: "string",
    			description: "Filter by exact workflow name.",
    		},
    		limit: {
    			type: "number",
    			description: "Page size (n8n default: 100, max: 250).",
    		},
    	},
    } as const;
  • The `listWorkflowsZod` Zod schema used inside the handler for runtime validation and parsing of the tool's arguments.
    const listWorkflowsZod = z.object({
    	active: z.boolean().optional(),
    	tags: z.string().optional(),
    	name: z.string().optional(),
    	limit: z.number().int().positive().max(250).optional(),
    });
  • src/index.ts:64-69 (registration)
    The tool registration object in the tools array: defines name 'n8n_list_workflows', description, and inputSchema reference.
    {
    	name: "n8n_list_workflows",
    	description:
    		"List workflows from a live n8n instance (requires N8N_API_URL + N8N_API_KEY env vars). Returns id, name, active, nodeCount, updatedAt, tags. Filter by active, tags, name. Use this when the user asks 'what workflows do I have?' or before n8n_get_workflow.",
    	inputSchema: listWorkflowsInputSchema,
    },
  • src/index.ts:119-120 (registration)
    The switch-case handler in CallToolRequestSchema that routes 'n8n_list_workflows' to the listWorkflows function.
    case "n8n_list_workflows":
    	return listWorkflows(args ?? {});
Behavior4/5

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

No annotations exist, so the description carries the full burden. It correctly indicates a read-only operation (list), discloses prerequisites (env vars), and lists returned fields. However, it does not mention rate limits or pagination behavior (e.g., limit parameter effects). Still, the core behavior is transparent.

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, front-loaded sentences. The first covers purpose, prerequisites, and return fields; the second gives explicit usage guidance. No wasted words.

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?

The description adequately explains the tool's purpose, prerequisites, filters, and return fields despite no output schema. It lacks detail on pagination or error responses, but for a list tool, this is mostly sufficient.

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% with descriptions for all parameters. The description adds little beyond the schema, merely repeating filter fields. Baseline for high coverage is 3, and no extra semantics are provided.

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 action ('list workflows') and the resource ('n8n instance'), distinguishes from sibling tools by mentioning it lists multiple workflows as opposed to getting a single one, and lists returned fields, making the purpose unambiguous.

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

Usage Guidelines5/5

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

Explicit usage guidance: 'Use this when the user asks "what workflows do I have?" or before n8n_get_workflow.' Also mentions required environment variables, providing a clear context and sequencing with a sibling tool.

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/AutomateLab-tech/n8n-mcp'

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