get_task
Retrieve a specific task by its ID from Clockify using workspace, project, and task identifiers. Facilitates precise task management and integration with time tracking workflows.
Instructions
Get a specific task by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID | |
| taskId | Yes | Task ID | |
| workspaceId | Yes | Workspace ID |
Implementation Reference
- src/index.ts:1183-1197 (handler)The handler function for the 'get_task' tool. It makes an API request to retrieve the specific task details from Clockify and formats the response as MCP content.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:774-776 (registration)The dispatch/registration case in the CallToolRequestSchema handler that routes calls to 'get_task' to the getTask method after input validation.case "get_task": if (!args?.workspaceId || !args?.projectId || !args?.taskId) throw new McpError(ErrorCode.InvalidParams, 'workspaceId, projectId and taskId are required'); return await this.getTask(args.workspaceId as string, args.projectId as string, args.taskId as string);
- src/index.ts:507-518 (registration)The tool registration entry in the ListToolsRequestSchema 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:42-49 (schema)TypeScript interface defining the structure of a Task object used in the tool.interface Task { id?: string; name: string; projectId: string; assigneeIds?: string[]; estimate?: string; status?: "ACTIVE" | "DONE"; }