get_current_task_details
Retrieve full context and details of the first uncompleted task to effectively manage and break down complex workflows. Designed for structured task tracking and progress monitoring in AI-driven environments.
Instructions
Retrieves details of the current task (first uncompleted task) with full context. This is the recommended tool to use when working with tasks.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1117-1179 (handler)The handler function for 'get_current_task_details'. It reads the current task data, identifies the first uncompleted checklist item as the current task, provides full details for it and limited details (excluding context_and_plan) for others to save context space, formats the response with ultimate goal, tasks list, context, progress, metadata, notes, and resources, and returns it as JSON string in MCP content format.private async getCurrentTaskDetails(): Promise<any> { try { const taskData = await this.readTaskData(); // Find the first uncompleted task const currentTaskIndex = taskData.checklist.findIndex(item => !item.done); // Process all tasks with different detail levels const tasks = taskData.checklist.map((item, index) => { if (index === currentTaskIndex) { // For the current task (first uncompleted), include all fields return { index, ...item, is_current: true }; } else { // For other tasks, exclude context_and_plan to save context window space const { context_and_plan, ...taskWithoutContext } = item; return { index, ...taskWithoutContext, is_current: false }; } }); // Format the response let response = { ultimate_goal: { description: taskData.task_description, note: "This is the final goal of the entire task, not just the current step." }, current_task_index: currentTaskIndex, tasks: tasks, context_for_all_tasks: taskData.context_for_all_tasks || "", progress: taskData.metadata.progress, metadata: taskData.metadata, notes: taskData.notes || [], resources: taskData.resources || [] }; return { content: [ { type: 'text', text: JSON.stringify(response, null, 2), }, ], }; } catch (error) { console.error('Error getting current task details:', error); return { content: [ { type: 'text', text: `Error getting current task details: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
- src/index.ts:408-416 (registration)Tool registration in the ListTools response, including name, description, and empty inputSchema (no parameters required).{ name: 'get_current_task_details', description: 'Retrieves details of the current task (first uncompleted task) with full context. This is the recommended tool to use when working with tasks.', inputSchema: { type: 'object', properties: {}, required: [] } }
- src/index.ts:452-453 (registration)Dispatch case in the CallToolRequestHandler switch statement that routes calls to the getCurrentTaskDetails handler method.case 'get_current_task_details': return await this.getCurrentTaskDetails();