Skip to main content
Glama

get_current_task_details

Retrieve details of the current uncompleted task with full context to understand what needs to be done next in complex task breakdown workflows.

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 for others (excluding context_and_plan), formats a structured response with ultimate goal, tasks list, context, progress, metadata, notes, and resources, and returns it as JSON text content.
    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, }; } }
  • The schema definition for the 'get_current_task_details' tool, including name, description, and empty input schema (no parameters required). This is part of the tools list returned by ListToolsRequest.
    { 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)
    The registration/dispatch case in the CallToolRequestHandler switch statement that calls the getCurrentTaskDetails handler when the tool name matches.
    case 'get_current_task_details': return await this.getCurrentTaskDetails();

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/landicefu/divide-and-conquer-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server