Skip to main content
Glama

complete_todo

Mark tasks as completed in Coach AI's task management system by specifying the todo ID to track progress and maintain productivity.

Instructions

Mark a todo as complete.

Args: todo_id: The ID of the todo to complete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
todo_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The core logic that updates the todo status to 'completed' in the database.
    async def complete_todo(todo_id: int) -> str:
        """Mark a todo as complete.
    
        Args:
            todo_id: The ID of the todo to complete
    
        Returns:
            Success message or error
        """
        db = await get_db()
    
        # Get todo title for confirmation
        cursor = await db.execute("SELECT title FROM todos WHERE id = ?", (todo_id,))
        row = await cursor.fetchone()
    
        if not row:
            return f"Error: Todo #{todo_id} not found."
    
        # Mark as complete
        await db.execute(
            "UPDATE todos SET status = 'completed', completed_at = CURRENT_TIMESTAMP WHERE id = ?",
            (todo_id,),
        )
        await db.commit()
    
        return f"✓ Completed: {row['title']}"
  • The MCP tool registration using @mcp.tool() and the wrapper function that calls the storage handler.
    @mcp.tool()
    async def complete_todo(todo_id: int) -> str:
        """Mark a todo as complete.
    
        Args:
            todo_id: The ID of the todo to complete
        """
        return await storage.complete_todo(todo_id)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it states the action ('Mark... as complete'), it fails to disclose if the operation is idempotent, reversible, or if it triggers side effects like logging to log_accomplishment. It also does not mention the return value, though an output schema exists.

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?

The description is appropriately brief and front-loaded with the action statement. The Args section is structurally clear and necessary given the schema's lack of descriptions. No sentences are wasted, though the Args formatting is slightly redundant with standard schema documentation patterns.

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

Completeness3/5

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

For a single-parameter mutation tool with an output schema, the description is minimally sufficient. It covers the core action and parameter, but given the lack of annotations and the presence of related workflow tools (log_accomplishment, set_todo_timeframe), it omits relevant contextual details about integration with the broader task management workflow.

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%, leaving the description to compensate. The Args section successfully documents the single parameter (todo_id: 'The ID of the todo to complete'), providing necessary semantic context that the schema lacks. It does not add format constraints or example values, but adequately covers the single required parameter.

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 uses a specific verb ('Mark') and resource ('todo') with a clear outcome ('as complete'). It inherently distinguishes from siblings like add_todo, delete_todo, and list_todos through the verb choice, though it does not explicitly name alternatives.

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?

The description provides no guidance on when to use this tool versus alternatives like delete_todo (permanent removal) or set_todo_timeframe (scheduling). It does not mention prerequisites (e.g., todo must exist) or side effects.

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