get_task
Retrieve a specific task by its ID from Clockify to access task details, track progress, and manage time entries within projects and workspaces.
Instructions
Get a specific task by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | Yes | Workspace ID | |
| projectId | Yes | Project ID | |
| taskId | Yes | Task ID |
Implementation Reference
- src/index.ts:1183-1197 (handler)The handler function that executes the get_task tool. It makes an API request to retrieve the specific task from Clockify and returns formatted text details including name, ID, status, estimate, and assignee count.private async getTask(workspaceId: string, projectId: string, taskId: string) { const task = await this.makeRequest( `/workspaces/${workspaceId}/projects/${projectId}/tasks/${taskId}` ); return { content: [ { type: "text", text: `Task Details:\nName: ${task.name}\nID: ${task.id}\nProject: ${projectId}\nStatus: ${task.status}\nEstimate: ${task.estimate || "No estimate"}\nAssignees: ${task.assigneeIds?.length || 0}`, }, ], isError: false, }; }
- src/index.ts:509-517 (schema)Input schema definition for the get_task tool, specifying required parameters: workspaceId, projectId, and taskId.inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, projectId: { type: "string", description: "Project ID" }, taskId: { type: "string", description: "Task ID" }, }, required: ["workspaceId", "projectId", "taskId"], },
- src/index.ts:506-518 (registration)Registration of the get_task tool in the ListTools response, including name, description, and input schema.{ name: "get_task", description: "Get a specific task by ID", inputSchema: { type: "object", properties: { workspaceId: { type: "string", description: "Workspace ID" }, projectId: { type: "string", description: "Project ID" }, taskId: { type: "string", description: "Task ID" }, }, required: ["workspaceId", "projectId", "taskId"], }, },
- src/index.ts:777-779 (registration)Dispatch registration in the CallToolRequestSchema handler switch statement, which validates arguments and calls the getTask handler.case "update_task": if (!args?.workspaceId || !args?.projectId || !args?.taskId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId, projectId and taskId are required'); return await this.updateTask(args as any);
- src/index.ts:42-49 (schema)TypeScript interface defining the Task structure used in the codebase, matching the expected API response.interface Task { id?: string; name: string; projectId: string; assigneeIds?: string[]; estimate?: string; status?: "ACTIVE" | "DONE"; }