todo_get
Retrieve complete details of a specific todo snapshot using its unique ID to access saved task information.
Instructions
Get full details of a specific todo snapshot by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| snapshot_id | Yes | Todo snapshot ID |
Input Schema (JSON Schema)
{
"properties": {
"snapshot_id": {
"description": "Todo snapshot ID",
"type": "string"
}
},
"required": [
"snapshot_id"
],
"type": "object"
}
Implementation Reference
- src/mcp_server/server.py:474-480 (handler)Handler logic for the todo_get tool: retrieves todo snapshot by ID from storage, handles not found case, formats and returns the details.if name == "todo_get": snapshot_id = arguments["snapshot_id"] snapshot = self.storage.get_todo_snapshot(snapshot_id) if not snapshot: return [TextContent(type="text", text=f"Todo snapshot {snapshot_id} not found")] result = self._format_todo_snapshot_detail(snapshot) return [TextContent(type="text", text=result)]
- src/mcp_server/server.py:221-231 (schema)Schema definition and registration of the todo_get tool in the list_tools method, including input schema requiring snapshot_id.Tool( name="todo_get", description="Get full details of a specific todo snapshot by ID", inputSchema={ "type": "object", "properties": { "snapshot_id": {"type": "string", "description": "Todo snapshot ID"}, }, "required": ["snapshot_id"], }, ),
- src/mcp_server/server.py:711-737 (helper)Helper function used by todo_get to format the todo snapshot details into a readable string response.def _format_todo_snapshot_detail(self, snapshot: Any) -> str: """Format a single todo snapshot with full details.""" from models import TodoListSnapshot if not isinstance(snapshot, TodoListSnapshot): return "Invalid snapshot" lines = [ f"Snapshot ID: {snapshot.id}", f"Timestamp: {snapshot.timestamp.isoformat()}", f"Project: {snapshot.project_path}", f"Active: {'Yes' if snapshot.is_active else 'No'}", ] if snapshot.context: lines.append(f"Context: {snapshot.context}") if snapshot.session_context_id: lines.append(f"Linked Context ID: {snapshot.session_context_id}") lines.append("\n## Todo Items\n") for i, todo in enumerate(snapshot.todos, 1): status_icon = {"pending": "○", "in_progress": "⟳", "completed": "✓"}.get(todo.status, "○") lines.append(f"{i}. {status_icon} [{todo.status}] {todo.content}") return "\n".join(lines)