Skip to main content
Glama

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
NameRequiredDescriptionDefault
billableNoWhether project is billable (optional)
clientIdNoClient ID (optional)
colorNoProject color (hex code, optional)
estimateNoProject estimate (optional)
isPublicNoWhether project is public (optional)
nameYesProject name
workspaceIdYesWorkspace ID

Implementation Reference

  • 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, }; }
  • 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);
  • 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"; }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ratheesh-aot/clockify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server