delete-project
Remove a project by its ID using client authentication. Requires n8n Enterprise license with project management features enabled. Input must be provided as compact JSON.
Instructions
Delete a project by ID. 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 | ||
| projectId | Yes |
Implementation Reference
- src/index.ts:1195-1225 (handler)MCP tool handler for 'delete-project' in the CallToolRequestSchema switch statement. Retrieves the N8nClient instance, validates it exists, calls client.deleteProject(projectId), and returns success or error response.case "delete-project": { const { clientId, projectId } = args as { clientId: string; projectId: 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.deleteProject(projectId); return { content: [{ type: "text", text: `Successfully deleted project with ID: ${projectId}`, }] }; } catch (error) { return { content: [{ type: "text", text: error instanceof Error ? error.message : "Unknown error occurred", }], isError: true }; } }
- src/index.ts:216-220 (helper)N8nClient method that performs the actual DELETE request to the n8n API endpoint /projects/{projectId}.async deleteProject(projectId: string): Promise<void> { return this.makeRequest<void>(`/projects/${projectId}`, { method: 'DELETE', }); }
- src/index.ts:530-541 (registration)Tool registration in the ListToolsRequestSchema handler, defining the name, description, and input schema for 'delete-project'.{ name: "delete-project", description: "Delete a project by ID. 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" }, projectId: { type: "string" } }, required: ["clientId", "projectId"] } },
- src/index.ts:530-541 (schema)Input schema definition for the 'delete-project' tool, specifying clientId and projectId as required string parameters.{ name: "delete-project", description: "Delete a project by ID. 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" }, projectId: { type: "string" } }, required: ["clientId", "projectId"] } },