create_project
Create a new project in Clockify by specifying workspace ID, project name, and optional details like client ID, visibility, billing status, color, and estimates for efficient project management.
Instructions
Create a new project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| billable | No | Whether project is billable (optional) | |
| clientId | No | Client ID (optional) | |
| color | No | Project color (hex code, optional) | |
| estimate | No | Project estimate (optional) | |
| isPublic | No | Whether project is public (optional) | |
| name | Yes | Project name | |
| workspaceId | Yes | Workspace ID |
Implementation Reference
- src/index.ts:1033-1051 (handler)The main handler function for the 'create_project' tool. It extracts workspaceId and project data from arguments, makes a POST request to the Clockify API endpoint `/workspaces/{workspaceId}/projects`, and returns a success message with project details.private async createProject(args: any) { const { workspaceId, ...projectData } = args; const project = await this.makeRequest( `/workspaces/${workspaceId}/projects`, "POST", projectData ); return { content: [ { type: "text", text: `Project created successfully!\nID: ${project.id}\nName: ${project.name}\nClient: ${project.clientName || "No client"}\nPublic: ${project.public}\nBillable: ${project.billable}`, }, ], isError: false, }; }
- src/index.ts:385-406 (schema)Defines the input schema for the 'create_project' tool, specifying properties like workspaceId (required), name (required), and optional fields like clientId, isPublic, billable, color, and estimate.name: "create_project", description: "Create a new project", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, name: { type: "string", description: "Project name" }, clientId: { type: "string", description: "Client ID (optional)" }, isPublic: { type: "boolean", description: "Whether project is public (optional)" }, billable: { type: "boolean", description: "Whether project is billable (optional)" }, color: { type: "string", description: "Project color (hex code, optional)" }, estimate: { type: "object", properties: { estimate: { type: "string", description: "Estimate duration (ISO 8601 duration)" }, type: { type: "string", enum: ["AUTO", "MANUAL"], description: "Estimate type" }, }, description: "Project estimate (optional)", }, }, required: ["workspaceId", "name"], },
- src/index.ts:751-753 (registration)Registers the handler for 'create_project' in the CallToolRequestSchema switch statement by calling this.createProject(args).case "create_project": if (!args?.workspaceId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId is required'); return await this.createProject(args as any);
- src/index.ts:28-40 (schema)TypeScript interface defining the structure of a Project object, used for type safety in create_project and related operations.interface Project { id?: string; name: string; clientId?: string; workspaceId: string; isPublic?: boolean; billable?: boolean; color?: string; estimate?: { estimate: string; type: "AUTO" | "MANUAL"; }; }