update_task_description
Modify the description of a task in the 'Divide and Conquer MCP Server', enabling precise updates to task details for efficient progress tracking and management.
Instructions
Updates the main task description.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_description | Yes | The new task description |
Implementation Reference
- src/index.ts:603-637 (handler)The private async method that implements the core logic for the 'update_task_description' tool. It reads the current task data from the config file, updates the 'task_description' field with the provided argument, recalculates progress and updates metadata, persists the changes back to the file, and returns a success or error message.private async updateTaskDescription(args: any): Promise<any> { if (!args?.task_description) { throw new McpError(ErrorCode.InvalidParams, 'Task description is required'); } try { const taskData = await this.readTaskData(); // Update the task description taskData.task_description = args.task_description; // Write the updated task data to the file await this.writeTaskData(taskData); return { content: [ { type: 'text', text: 'Task description updated successfully.', }, ], }; } catch (error) { console.error('Error updating task description:', error); return { content: [ { type: 'text', text: `Error updating task description: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
- src/index.ts:178-187 (schema)Input schema for the 'update_task_description' tool, defining the required 'task_description' parameter as a string.inputSchema: { type: 'object', properties: { task_description: { type: 'string', description: 'The new task description' } }, required: ['task_description'] }
- src/index.ts:175-188 (registration)Registration of the 'update_task_description' tool in the ListToolsRequestSchema handler, providing name, description, and input schema to MCP clients.{ name: 'update_task_description', description: 'Updates the main task description.', inputSchema: { type: 'object', properties: { task_description: { type: 'string', description: 'The new task description' } }, required: ['task_description'] } },
- src/index.ts:426-427 (registration)Dispatch registration in the CallToolRequestSchema handler's switch statement, routing tool calls named 'update_task_description' to the specific handler method.case 'update_task_description': return await this.updateTaskDescription(request.params.arguments);