list_workflows
Retrieve and display all available n8n workflows to manage automation processes and review existing workflow configurations.
Instructions
List all n8n workflows
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | ||
| limit | No |
Implementation Reference
- src/index.ts:69-69 (registration)Registration of the 'list_workflows' tool in the MCP server, including name, description, and input schema{ name: 'list_workflows', description: 'List all n8n workflows', inputSchema: { type: 'object', properties: { limit: { type: 'number' }, cursor: { type: 'string' } } } },
- src/index.ts:386-391 (handler)Main handler function for list_workflows tool that delegates to N8nClient and formats response with aliasesprivate async handleListWorkflows(args?: { limit?: number; cursor?: string }) { const workflows = await this.n8nClient.listWorkflows(args?.limit, args?.cursor); // attach aliases for each workflow in the list this.withAlias(workflows.data); return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess(workflows), null, 2) }] }; }
- src/index.ts:226-227 (handler)Switch case dispatching to handleListWorkflows in CallToolRequestSchema handlercase 'list_workflows': return await this.handleListWorkflows(request.params.arguments as { limit?: number; cursor?: string });
- src/n8n-client.ts:151-158 (helper)N8nClient method implementing the API call to retrieve workflows list with paginationasync listWorkflows(limit?: number, cursor?: string): Promise<N8nWorkflowsListResponse> { const params = new URLSearchParams(); if (limit) params.append('limit', limit.toString()); if (cursor) params.append('cursor', cursor); const url = params.toString() ? `/workflows?${params.toString()}` : '/workflows'; const response = await this.api.get<N8nWorkflowsListResponse>(url); return response.data; }