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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"todo_id": "<todo_id>"
},
"name": "delete_todo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| todo_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/coach_ai/storage.py:239-259 (handler)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']}" - src/coach_ai/server.py:156-163 (registration)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)