get_project
Retrieve detailed information about a specific project by providing its unique ID and associated workspace ID within the Clockify MCP Server.
Instructions
Get a specific project by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID | |
| workspaceId | Yes | Workspace ID |
Implementation Reference
- src/index.ts:1082-1094 (handler)The core handler function for the 'get_project' tool. It fetches the specific project data from the Clockify API using the provided workspaceId and projectId, then returns a formatted text response with key project details.private async getProject(workspaceId: string, projectId: string) { const project = await this.makeRequest(`/workspaces/${workspaceId}/projects/${projectId}`); return { content: [ { type: "text", text: `Project Details:\nName: ${project.name}\nID: ${project.id}\nClient: ${project.clientName || "No client"}\nPublic: ${project.public}\nBillable: ${project.billable}\nColor: ${project.color}\nArchived: ${project.archived}`, }, ], isError: false, }; }
- src/index.ts:430-441 (registration)Tool registration in the ListTools response. Defines the name, description, and input schema for 'get_project', specifying required parameters: workspaceId and projectId.{ name: "get_project", description: "Get a specific project by ID", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, projectId: { type: "string", description: "Project ID" }, }, required: ["workspaceId", "projectId"], }, },
- src/index.ts:757-759 (registration)Dispatch logic in the CallToolRequest handler switch statement that validates input parameters and invokes the getProject handler for 'get_project' tool calls.case "get_project": if (!args?.workspaceId || !args?.projectId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId and projectId are required'); return await this.getProject(args.workspaceId as string, args.projectId as string);
- src/index.ts:28-40 (schema)TypeScript interface defining the structure of a Project object, used throughout the codebase for type safety in project-related operations.interface Project { id?: string; name: string; clientId?: string; workspaceId: string; isPublic?: boolean; billable?: boolean; color?: string; estimate?: { estimate: string; type: "AUTO" | "MANUAL"; }; }