Skip to main content
Glama

n8n_list_workflows

Retrieve and filter workflows from your n8n instance to view IDs, names, and active status for management.

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 core handler function for the n8n_list_workflows tool. It calls the N8nApiClient to list workflows with optional filters and returns formatted JSON response.
    export const workflowToolHandlers = { 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 ToolDefinition schema specifying the tool's 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)', }, }, }, },
  • Registration of all tools including workflowTools (containing n8n_list_workflows schema) into the combined allTools array used by the MCP server.
    export const allTools: ToolDefinition[] = [ ...documentationTools, // Documentation first for discoverability ...workflowTools, ...executionTools, ];
  • src/server.ts:60-64 (registration)
    MCP server handler for listing tools, providing the allTools array which includes n8n_list_workflows.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: allTools, }; });
  • src/server.ts:122-125 (registration)
    Tool call dispatch logic that routes calls to the specific workflowToolHandlers object containing the n8n_list_workflows handler.
    if (name in workflowToolHandlers) { const handler = workflowToolHandlers[name as keyof typeof workflowToolHandlers]; return handler(client, args); }

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