Skip to main content
Glama
SDGLBL
by SDGLBL

todo_read

Retrieve the current to-do list for a Claude Desktop session to track task status, prioritize work, and maintain awareness of pending items during development workflows.

Instructions

Use this tool to read the current to-do list for the session. This tool should be used proactively and frequently to ensure that you are aware of the status of the current task list. You should make use of this tool as often as possible, especially in the following situations:

  • At the beginning of conversations to see what's pending

  • Before starting new tasks to prioritize work

  • When the user asks about previous tasks or plans

  • Whenever you're uncertain about what to do next

  • After completing tasks to update your understanding of remaining work

  • After every few messages to ensure you're on track

Usage:

  • This tool requires a session_id parameter to identify the Claude Desktop conversation

  • Returns a list of todo items with their status, priority, and content

  • Use this information to track progress and plan next steps

  • If no todos exist yet for the session, an empty list will be returned

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesUnique identifier for the Claude Desktop session (generate using timestamp command)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `call` method in `TodoReadTool` class implements the core logic of the `todo_read` tool: validates session_id, retrieves todos from `TodoStorage`, logs activity, and returns JSON string of todos.
    async def call(
        self,
        ctx: MCPContext,
        **params: Unpack[TodoReadToolParams],
    ) -> str:
        """Execute the tool with the given parameters.
    
        Args:
            ctx: MCP context
            **params: Tool parameters
    
        Returns:
            Tool result
        """
        tool_ctx = self.create_tool_context(ctx)
        self.set_tool_context_info(tool_ctx)
    
        # Extract parameters
        session_id = params.get("session_id")
    
        # Validate required parameters for direct calls (not through MCP framework)
        if session_id is None:
            await tool_ctx.error("Parameter 'session_id' is required but was None")
            return "Error: Parameter 'session_id' is required but was None"
    
        session_id = str(session_id)
    
        # Validate session ID
        is_valid, error_msg = self.validate_session_id(session_id)
        if not is_valid:
            await tool_ctx.error(f"Invalid session_id: {error_msg}")
            return f"Error: Invalid session_id: {error_msg}"
    
        await tool_ctx.info(f"Reading todos for session: {session_id}")
    
        try:
            # Get todos from storage
            todos = TodoStorage.get_todos(session_id)
    
            # Log status
            if todos:
                await tool_ctx.info(
                    f"Found {len(todos)} todos for session {session_id}"
                )
            else:
                await tool_ctx.info(
                    f"No todos found for session {session_id} (returning empty list)"
                )
    
            # Return todos as JSON string
            result = json.dumps(todos, indent=2)
    
            return result
    
        except Exception as e:
            await tool_ctx.error(f"Error reading todos: {str(e)}")
            return f"Error reading todos: {str(e)}"
  • Parameter schema definitions: `SessionId` Pydantic `Annotated` type and `TodoReadToolParams` `TypedDict` specifying the `session_id` input parameter.
    SessionId = Annotated[
        str | int | float,
        Field(
            description="Unique identifier for the Claude Desktop session (generate using timestamp command)"
        ),
    ]
    
    
    class TodoReadToolParams(TypedDict):
        """Parameters for the TodoReadTool.
    
        Attributes:
            session_id: Unique identifier for the Claude Desktop session (generate using timestamp command)
        """
    
        session_id: SessionId
  • The `register` method of `TodoReadTool` that applies the `@mcp_server.tool` decorator to create the `todo_read` tool wrapper function matching the schema.
    def register(self, mcp_server: FastMCP) -> None:
        """Register this todo read tool with the MCP server.
    
        Creates a wrapper function with explicitly defined parameters that match
        the tool's parameter schema and registers it with the MCP server.
    
        Args:
            mcp_server: The FastMCP server instance
        """
        tool_self = self  # Create a reference to self for use in the closure
    
        @mcp_server.tool(name=self.name, description=self.description)
        async def todo_read(
            ctx: MCPContext,
            session_id: SessionId,
        ) -> str:
            ctx = get_context()
            return await tool_self.call(ctx, session_id=session_id)
  • Functions to instantiate `TodoReadTool` and register all todo tools via `ToolRegistry`.
    def get_todo_tools() -> list[BaseTool]:
        """Create instances of all todo tools.
    
        Returns:
            List of todo tool instances
        """
        return [
            TodoReadTool(),
            TodoWriteTool(),
        ]
    
    
    def register_todo_tools(mcp_server: FastMCP) -> list[BaseTool]:
        """Register all todo tools with the MCP server.
    
        Args:
            mcp_server: The FastMCP server instance
    
        Returns:
            List of registered tools
        """
        tools = get_todo_tools()
        ToolRegistry.register_tools(mcp_server, tools)
        return tools
  • Invocation of `register_todo_tools(mcp_server)` as part of registering all tools with the MCP server.
    # Register todo tools
    todo_tools = register_todo_tools(mcp_server)
    for tool in todo_tools:
        all_tools[tool.name] = tool
    
    # Initialize and register thinking tool
    thinking_tool = register_thinking_tool(mcp_server)
    for tool in thinking_tool:
        all_tools[tool.name] = tool
    
    # Register batch tool
    register_batch_tool(mcp_server, all_tools)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it's a read operation (implied by 'read'), requires a session_id parameter, returns structured data (list with status, priority, content), and handles empty cases (returns empty list). It doesn't mention error conditions or rate limits, but covers core functionality well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage guidelines, parameter info, return behavior). However, it's verbose with repetitive encouragement ('proactively and frequently,' 'as often as possible') and could be more concise. The core information is front-loaded, but some sentences don't add essential value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, read-only operation) and the presence of an output schema (implied by context signals), the description is reasonably complete. It covers purpose, usage, parameters, and return behavior adequately. It doesn't need to explain return values in detail due to the output schema, but could briefly mention error handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the session_id parameter. The description adds minimal value beyond the schema by mentioning the parameter is required and suggesting how to generate it ('using timestamp command'), but doesn't provide additional semantic context. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'to read the current to-do list for the session.' It specifies the resource (to-do list) and verb (read), making the function unambiguous. However, it doesn't explicitly differentiate from its sibling 'todo_write' beyond the read/write distinction implied by the names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extensive guidance on when to use the tool, listing six specific situations (e.g., 'At the beginning of conversations,' 'Before starting new tasks'). It also implicitly distinguishes from 'todo_write' by focusing on reading rather than writing, though it doesn't explicitly name alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/SDGLBL/mcp-claude-code'

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