clickup_get_task
Retrieve a specific ClickUp task by its ID to access task details and information within your workspace.
Instructions
Get a task by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes |
Implementation Reference
- src/controllers/task.controller.ts:23-36 (handler)Tool definition including name, description, input schema, and handler function for 'clickup_get_task'. The handler extracts task_id and calls taskService.getTask().const getTaskTool = defineTool((z) => ({ name: "clickup_get_task", description: "Get a task by its ID", inputSchema: { task_id: z.string(), }, handler: async (input) => { const { task_id } = input; const response = await taskService.getTask(task_id); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }, }));
- src/services/task.service.ts:34-38 (helper)Core implementation of fetching a task from ClickUp API using the private request method.async getTask(taskId: string): Promise<ClickUpTask> { return this.request<ClickUpTask>( `/task/${taskId}?custom_task_ids=false&team_id=${this.workspaceId}&include_subtasks=true&include_markdown_description=true` ); }
- src/index.ts:89-91 (registration)Registers the 'clickup_get_task' tool (along with others) on the MCP server by iterating over the tools array and calling server.tool.tools.forEach((tool) => { server.tool(tool.name, tool.description, tool.inputSchema, tool.handler); });
- Zod input schema defining the required 'task_id' string parameter.inputSchema: { task_id: z.string(), },
- src/services/task.service.ts:23-32 (helper)Private request helper method used by getTask to make HTTP requests to ClickUp API.private async request<T>( endpoint: string, options: RequestInit = {} ): Promise<T> { const response = await fetch(`${BASE_URL}${endpoint}`, { ...options, headers: this.headers, }); return response.json(); }