update_task_description
Modify the main task description to reflect changes in requirements or scope within the Divide and Conquer MCP Server's structured task management system.
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 main handler function that reads the current task data from file, updates the task_description field with the provided argument, persists the changes using writeTaskData, 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:175-188 (registration)Registers the 'update_task_description' tool in the MCP server's list of tools, including its name, description, and input schema for validation.{ 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:178-186 (schema)Defines the input schema for the tool, requiring a 'task_description' string.inputSchema: { type: 'object', properties: { task_description: { type: 'string', description: 'The new task description' } }, required: ['task_description']
- src/index.ts:426-427 (helper)Switch case in the main CallToolRequestSchema handler that routes calls to the updateTaskDescription method.case 'update_task_description': return await this.updateTaskDescription(request.params.arguments);