Skip to main content
Glama

delete_todo

Remove completed or unnecessary tasks from your Coach AI to-do list by specifying the task ID, helping maintain an organized and focused productivity system.

Instructions

Delete a todo permanently.

Args: todo_id: The ID of the todo to delete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
todo_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The storage-level implementation of the delete_todo logic, interacting directly with the database.
    async def delete_todo(todo_id: int) -> str:
        """Delete a todo permanently.
    
        Args:
            todo_id: The ID of the todo to delete
    
        Returns:
            Success message or error
        """
        db = await get_db()
    
        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."
    
        await db.execute("DELETE FROM todos WHERE id = ?", (todo_id,))
        await db.commit()
    
        return f"✓ Deleted: {row['title']}"
  • The MCP tool registration and handler wrapper for delete_todo.
    @mcp.tool()
    async def delete_todo(todo_id: int) -> str:
        """Delete a todo permanently.
    
        Args:
            todo_id: The ID of the todo to delete
        """
        return await storage.delete_todo(todo_id)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully communicates the destructive nature via 'permanently,' but omits other behavioral details such as error handling (e.g., what happens if the ID doesn't exist), cascading effects, or confirmation requirements.

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

Conciseness5/5

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

The description is appropriately brief and front-loaded. The main action is stated immediately, followed by a standard Args docstring section. No extraneous text is present.

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 deletion tool, the description is minimally adequate. It notes the permanent nature of the operation. However, given the lack of annotations and schema descriptions, it could benefit from mentioning error cases or side effects, even though an output schema exists (excusing it from detailing return values).

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?

The schema has 0% description coverage, so the description compensates via the Args block documenting 'todo_id: The ID of the todo to delete.' This provides necessary semantic context missing from the schema, though it could further clarify constraints (e.g., 'must exist').

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 action ('Delete') and resource ('todo') with the modifier 'permanently' indicating irreversibility. However, it does not explicitly differentiate from the sibling tool 'complete_todo' (which likely marks items as done without removing them).

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?

No guidance is provided on when to use deletion versus completion (complete_todo) or other alternatives. The description lacks 'when to use' or 'when not to use' instructions.

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