n8n_list_projects
Retrieve all n8n projects to organize workflows and credentials into separate workspaces. Supports pagination and result limits for efficient workspace management.
Instructions
List all projects.
Projects help organize workflows and credentials into separate workspaces.
Args:
limit (number): Maximum results (default: 100)
cursor (string, optional): Pagination cursor
Returns: List of projects with id, name, and type (personal/team).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results to return | |
| cursor | No | Pagination cursor |
Implementation Reference
- src/tools/projects.ts:44-66 (handler)The handler function for the n8n_list_projects tool that fetches projects from the n8n API.
async (params: z.infer<typeof ListProjectsSchema>) => { const queryParams: Record<string, unknown> = { limit: params.limit }; if (params.cursor) queryParams.cursor = params.cursor; const response = await get<N8nPaginatedResponse<N8nProject>>('/projects', queryParams); const formatted = response.data.map(formatProject).join('\n\n'); const output = { count: response.data.length, projects: response.data, nextCursor: response.nextCursor }; let text = `Found ${response.data.length} project(s):\n\n${formatted}`; if (response.nextCursor) { text += `\n\n_More results available. Use cursor: ${response.nextCursor}_`; } return { content: [{ type: 'text', text }], structuredContent: output }; } - src/tools/projects.ts:22-43 (registration)Registration of the n8n_list_projects tool.
server.registerTool( 'n8n_list_projects', { title: 'List n8n Projects', description: `List all projects. Projects help organize workflows and credentials into separate workspaces. Args: - limit (number): Maximum results (default: 100) - cursor (string, optional): Pagination cursor Returns: List of projects with id, name, and type (personal/team).`, inputSchema: ListProjectsSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false } },