get_completed_tasks
Retrieve a permanent archive of all completed tasks in chronological or logical order. Maintains a history of accomplishments even after tasks are removed from the workspace, enabling progress review and task tracking.
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-160 (handler)The handler function that executes the get_completed_tasks tool logic, calling task_manager.get_completed_tasks and formatting the response with task details.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 definition including JSON input schema, description, for the get_completed_tasks tool.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 handler in the MCP server's call_tool decorator handler_map."get_completed_tasks": lambda: handlers.handle_get_completed_tasks( arguments.get("order", "chronological") ),
- src/task_manager.py:266-273 (helper)Core helper method in TaskManager that retrieves the list of completed tasks, either chronologically or logically ordered.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'")