create-project
Initiate new projects in n8n by specifying client ID and project name via compact JSON input. Requires n8n Enterprise with project management enabled.
Instructions
Create a new project in n8n. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clientId | Yes | ||
| name | Yes |
Implementation Reference
- src/index.ts:1163-1193 (handler)Handler logic for the 'create-project' tool. Retrieves the N8nClient instance using clientId, validates it exists, then calls the client's createProject method with the provided name, handling success and error responses.case "create-project": { const { clientId, name } = args as { clientId: string; name: string }; const client = clients.get(clientId); if (!client) { return { content: [{ type: "text", text: "Client not initialized. Please run init-n8n first.", }], isError: true }; } try { await client.createProject(name); return { content: [{ type: "text", text: `Successfully created project: ${name}`, }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
- src/index.ts:519-528 (schema)Input schema definition for the 'create-project' tool, specifying clientId and name as required string parameters.name: "create-project", description: "Create a new project in n8n. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, name: { type: "string" } }, required: ["clientId", "name"] }
- src/index.ts:519-528 (registration)Registration of the 'create-project' tool in the ListToolsRequestSchema handler's tools array.name: "create-project", description: "Create a new project in n8n. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.", inputSchema: { type: "object", properties: { clientId: { type: "string" }, name: { type: "string" } }, required: ["clientId", "name"] }
- src/index.ts:209-214 (helper)N8nClient helper method that makes a POST request to '/projects' with the project name to create a new project.async createProject(name: string): Promise<void> { return this.makeRequest<void>('/projects', { method: 'POST', body: JSON.stringify({ name }), }); }