Skip to main content
Glama

list_todos

View tasks filtered by completion status to manage your to-do list effectively. Use this tool to see active, completed, or all tasks for better productivity organization.

Instructions

List todos filtered by status.

Args: status: Filter by 'active', 'completed', or 'all' (default: 'active')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoactive

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual implementation of the list_todos functionality, which queries the database and formats the results.
    async def list_todos(status: str = "active") -> str:
        """List todos filtered by status.
    
        Args:
            status: Filter by 'active', 'completed', or 'all'
    
        Returns:
            Formatted list of todos
        """
        db = await get_db()
    
        if status == "all":
            cursor = await db.execute(
                "SELECT * FROM todos ORDER BY priority DESC, created_at DESC"
            )
        else:
            cursor = await db.execute(
                "SELECT * FROM todos WHERE status = ? ORDER BY priority DESC, created_at DESC",
                (status,),
            )
    
        rows = await cursor.fetchall()
    
        if not rows:
            return f"No {status} todos found."
    
        # Format output
        result = f"\n=== {status.upper()} TODOS ===\n\n"
    
        # Group by priority
        priority_groups = {"high": [], "medium": [], "low": []}
        for row in rows:
            priority_groups[row["priority"]].append(row)
    
        for priority in ["high", "medium", "low"]:
            todos = priority_groups[priority]
            if todos:
                result += f"{priority.upper()} PRIORITY:\n"
                for todo in todos:
                    result += f"  [{todo['id']}] {todo['title']}\n"
                    if todo["notes"]:
                        result += f"      Notes: {todo['notes']}\n"
                result += "\n"
    
        return result.strip()
  • The MCP tool registration for list_todos, which calls the storage implementation.
    @mcp.tool()
    async def list_todos(status: str = "active") -> str:
        """List todos filtered by status.
    
        Args:
            status: Filter by 'active', 'completed', or 'all' (default: 'active')
        """
        return await storage.list_todos(status)
Behavior3/5

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

Since no annotations are provided, the description carries the full burden. It discloses the filtering capability with specific enum values, implying a read operation. However, it omits safety confirmations (read-only nature), pagination behavior, or ordering of results despite the tool having an output schema.

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

Conciseness4/5

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

Front-loaded single sentence states the core purpose efficiently. The 'Args:' format is slightly unconventional for MCP descriptions but remains clear and wastes no words on the single parameter explanation.

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?

Adequate for a simple single-parameter list operation. The existence of an output schema (per context signals) excuses the lack of return value description in the text, and the parameter semantics are covered sufficiently for agent invocation.

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

Parameters4/5

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

Schema description coverage is 0% (status property lacks description field). The description compensates effectively by documenting the valid enum values ('active', 'completed', 'all') and default behavior, though it redundantly repeats the default value already present in the schema.

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?

States specific verb 'List' and resource 'todos' with scope 'filtered by status'. However, it does not explicitly differentiate from sibling 'list_goals' or clarify when to query todos versus other task-related entities.

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

Usage Guidelines2/5

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

Provides no guidance on when to use this tool versus alternatives like 'list_goals' or 'brain_dump_tasks', nor does it mention prerequisites such as existing todos or daily note setup.

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/94aharris/coach-ai'

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