list_workflows
Retrieve a list of n8n workflows with optional filters for active status, tags, and pagination using cursor.
Instructions
List all n8n workflows with optional filtering
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_workflows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| active | No | Filter by active status | |
| limit | No | Maximum number of workflows to return | |
| cursor | No | Cursor for pagination | |
| tags | No | Filter by tags |
Implementation Reference
- src/n8n-client.ts:61-68 (handler)Handler function on N8nClient class that makes GET request to /api/v1/workflows with optional filtering parameters (active, limit, cursor, tags).
async listWorkflows(params?: { active?: boolean; limit?: number; cursor?: string; tags?: string[]; }) { const response = await this.client.get("/api/v1/workflows", { params }); return response.data; - src/handlers.ts:5-10 (schema)Zod schema for validating list_workflows input parameters (active, limit, cursor, tags).
const ListWorkflowsSchema = z.object({ active: z.boolean().optional(), limit: z.number().optional().default(10), cursor: z.string().optional(), tags: z.array(z.string()).optional(), }); - src/tools.ts:3-29 (registration)Tool registration definition with name, description, and JSON Schema inputSchema for the list_workflows tool.
{ name: "list_workflows", description: "List all n8n workflows with optional filtering", inputSchema: { type: "object", properties: { active: { type: "boolean", description: "Filter by active status", }, limit: { type: "number", description: "Maximum number of workflows to return", default: 10, }, cursor: { type: "string", description: "Cursor for pagination", }, tags: { type: "array", items: { type: "string" }, description: "Filter by tags", }, }, }, }, - src/handlers.ts:75-78 (handler)Router case in handleToolCall that validates args via ListWorkflowsSchema and delegates to client.listWorkflows().
case "list_workflows": { const params = ListWorkflowsSchema.parse(args); return await client.listWorkflows(params); }