Skip to main content
Glama

todo_list

Retrieve recent todo snapshots to track tasks and manage project workflows, with options to filter by project path and limit results.

Instructions

List recent todo snapshots

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of results
project_pathNoFilter by project path

Input Schema (JSON Schema)

{ "properties": { "limit": { "default": 20, "description": "Maximum number of results", "type": "integer" }, "project_path": { "description": "Filter by project path", "type": "string" } }, "type": "object" }

Implementation Reference

  • Handler logic for the 'todo_list' tool call. Retrieves todo snapshots from storage using the provided limit and optional project_path filter, formats the list, and returns it as formatted text.
    if name == "todo_list": limit = arguments.get("limit", 20) project_path = arguments.get("project_path") snapshots = self.storage.list_todo_snapshots(project_path=project_path, limit=limit) result = self._format_todo_snapshots_response(snapshots) return [TextContent(type="text", text=result)]
  • Registration of the 'todo_list' tool in the list_tools() method, defining its name, description, and input schema.
    name="todo_list", description="List recent todo snapshots", inputSchema={ "type": "object", "properties": { "limit": { "type": "integer", "description": "Maximum number of results", "default": 20, }, "project_path": { "type": "string", "description": "Filter by project path", }, }, }, ),
  • Helper function to format the list of todo snapshots into a human-readable string response for the todo_list tool.
    def _format_todo_snapshots_response(self, snapshots: list[Any]) -> str: """Format a list of todo snapshots for response.""" from models import TodoListSnapshot if not snapshots: return "No todo snapshots found." lines = [f"Found {len(snapshots)} todo snapshots:\n"] for snapshot in snapshots: if isinstance(snapshot, TodoListSnapshot): active_icon = "★" if snapshot.is_active else "○" completed = sum(1 for t in snapshot.todos if t.status == "completed") total = len(snapshot.todos) context_str = f" - {snapshot.context}" if snapshot.context else "" lines.append( f"{active_icon} {snapshot.timestamp.isoformat()}\n" f" ID: {snapshot.id}\n" f" Project: {snapshot.project_path}\n" f" Progress: {completed}/{total} completed{context_str}\n" ) return "\n".join(lines)
  • Pydantic schema definitions for Todo item and TodoListSnapshot used in todo_list tool's data handling and storage.
    class Todo(BaseModel): """Represents a single todo item.""" content: str status: str # "pending" | "in_progress" | "completed" activeForm: str # noqa: N815 - matches Claude Code TodoWrite tool format class TodoListSnapshot(BaseModel): """Represents a saved snapshot of a todo list.""" id: str = Field(default_factory=lambda: str(uuid4())) timestamp: datetime = Field(default_factory=datetime.now) project_path: str git_branch: str | None = None todos: list[Todo] context: str | None = None session_context_id: str | None = None is_active: bool = False metadata: dict[str, Any] = Field(default_factory=dict)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/taylorleese/mcp-toolz'

If you have feedback or need assistance with the MCP directory API, please join our Discord server