Skip to main content
Glama

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
NameRequiredDescriptionDefault
cursorNo
limitNo

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' } } } },
  • Main handler function for list_workflows tool that delegates to N8nClient and formats response with aliases
    private 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) }] }; }
  • Switch case dispatching to handleListWorkflows in CallToolRequestSchema handler
    case 'list_workflows': return await this.handleListWorkflows(request.params.arguments as { limit?: number; cursor?: string });
  • N8nClient method implementing the API call to retrieve workflows list with pagination
    async 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; }

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

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