update_current_task
Modify the content of your actively focused task in the hierarchical task management system, ensuring updated notes and context are preserved for efficient problem-solving.
Instructions
Update notes/content of the task you're currently focused on (current task only)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | New body content for the task |
Implementation Reference
- src/handlers.py:161-170 (handler)The main handler function that processes the update_current_task tool call. It delegates to task_manager.update_current_task and formats the response.async def handle_update_current_task(self, body: str) -> Dict[str, Any]: try: task = self.task_manager.update_current_task(body) return { "task_id": task.id, "title": task.title, "message": "Task body updated successfully", } except ValueError as e: return {"error": str(e)}
- src/handlers.py:311-324 (schema)The input schema definition for the update_current_task tool, defining the required 'body' parameter.Tool( name="update_current_task", description="Update notes/content of the task you're currently focused on (current task only)", inputSchema={ "type": "object", "properties": { "body": { "type": "string", "description": "New body content for the task", } }, "required": ["body"], }, ),
- src/server.py:63-65 (registration)Registration of the tool handler in the server.py handler_map dictionary, mapping the tool name to its handler function."update_current_task": lambda: handlers.handle_update_current_task( arguments["body"] ),
- src/task_manager.py:175-181 (helper)Core helper function in TaskManager that performs the actual update of the current task's body.def update_current_task(self, body: str) -> Task: current = self.current_task if not current: raise ValueError("No current task to update") current.body = body return current