get_completed_tasks
View chronological history of all completed tasks in a permanent archive separate from the workspace structure. Useful for reviewing accomplishments over time.
Instructions
View chronological history of ALL completed tasks. This is a permanent archive separate from the visible structure. Tasks remain here even after being removed from the workspace. Useful for reviewing what you've accomplished over time.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | No | Order of completed tasks | chronological |
Implementation Reference
- src/handlers.py:139-159 (handler)The async handler function that processes the get_completed_tasks tool call. It retrieves completed tasks from the task manager using the specified order and formats them into a JSON response with count and task details including id, title, body, and completion time.async def handle_get_completed_tasks( self, order: str = "chronological" ) -> Dict[str, Any]: try: tasks = self.task_manager.get_completed_tasks(order) return { "count": len(tasks), "tasks": [ { "id": t.id, "title": t.title, "body": t.body, "completed_at": ( t.completed_at.isoformat() if t.completed_at else None ), } for t in tasks ], } except ValueError as e: return {"error": str(e)}
- src/handlers.py:296-310 (schema)The tool schema definition including input schema for the 'order' parameter (chronological or logical, default chronological). Part of get_tool_definitions().Tool( name="get_completed_tasks", description="View chronological history of ALL completed tasks. This is a permanent archive separate from the visible structure. Tasks remain here even after being removed from the workspace. Useful for reviewing what you've accomplished over time.", inputSchema={ "type": "object", "properties": { "order": { "type": "string", "enum": ["chronological", "logical"], "description": "Order of completed tasks", "default": "chronological", } }, }, ),
- src/server.py:60-62 (registration)Registration of the get_completed_tasks tool in the server handler_map, mapping it to the handlers.handle_get_completed_tasks function with order argument."get_completed_tasks": lambda: handlers.handle_get_completed_tasks( arguments.get("order", "chronological") ),
- src/task_manager.py:266-272 (helper)Helper method in TaskManager that returns the list of completed tasks, either in chronological order (default) or reversed (logical).def get_completed_tasks(self, order: str = "chronological") -> List[Task]: if order == "chronological": return self.completed_tasks.copy() elif order == "logical": return list(reversed(self.completed_tasks)) else: raise ValueError("Order must be 'chronological' or 'logical'")