get_task_details
Retrieve comprehensive task data from ClickUp: description, assignees, status, and dates. Use to view full task information.
Instructions
Get detailed information about a specific ClickUp task. Returns comprehensive task data including description, assignees, status, and dates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The ID of the task to get | |
| include_subtasks | No | Whether to include subtasks in the task details |
Implementation Reference
- src/clickup-client/tasks.ts:139-141 (handler)Actual handler that calls ClickUp API to get task details. Sends GET request to /task/{taskId} endpoint.
async getTask(taskId: string, params?: { include_subtasks?: boolean }): Promise<Task> { return this.client.get(`/task/${taskId}`, params); } - src/clickup-client/tasks.ts:3-50 (schema)TypeScript interface defining the shape of a Task object returned by the API.
export interface Task { id: string; name: string; description?: string; status?: { status: string; color: string; }; date_created?: string; date_updated?: string; date_closed?: string; creator?: { id: number; username: string; email: string; }; assignees?: Array<{ id: number; username: string; email: string; }>; priority?: { id: string; priority: string; color: string; }; due_date?: string | null; start_date?: string | null; time_estimate?: number | null; time_spent?: number | null; custom_fields?: Array<any>; list?: { id: string; name: string; }; folder?: { id: string; name: string; }; space?: { id: string; name: string; }; url: string; subtasks?: Task[]; // Add subtasks property parent?: string; // Add parent property top_level_parent?: string; // Add top_level_parent property } - src/tools/task-tools.ts:89-92 (schema)Zod schema defining the input parameters for the get_task_details tool (task_id required, include_subtasks optional).
{ task_id: z.string().describe('The ID of the task to get'), include_subtasks: z.boolean().optional().describe('Whether to include subtasks in the task details') }, - src/tools/task-tools.ts:86-107 (registration)Registration of the get_task_details tool on the MCP server with schema and handler function.
server.tool( 'get_task_details', 'Get detailed information about a specific ClickUp task. Returns comprehensive task data including description, assignees, status, and dates.', { task_id: z.string().describe('The ID of the task to get'), include_subtasks: z.boolean().optional().describe('Whether to include subtasks in the task details') }, async ({ task_id, include_subtasks }) => { try { const task = await tasksClient.getTask(task_id, { include_subtasks }); return { content: [{ type: 'text', text: JSON.stringify(task, null, 2) }] }; } catch (error: any) { console.error('Error getting task details:', error); return { content: [{ type: 'text', text: `Error getting task details: ${error.message}` }], isError: true }; } } ); - src/index.ts:40-47 (registration)Server initialization that calls setupTaskTools, which registers all task tools including get_task_details on the MCP server.
private setupTools() { // Set up all tools setupTaskTools(this.server); setupDocTools(this.server); setupSpaceTools(this.server); setupChecklistTools(this.server); setupCommentTools(this.server); }