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, }; });

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