Skip to main content
Glama

delete_todo

Remove a specific todo item from your task list by providing its unique ID and authentication token.

Instructions

Delete a todo item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authTokenYesAuthentication token from Kinde
todoIdYesID of the todo to delete

Implementation Reference

  • Handler for the 'delete_todo' tool. Lists the user's todos after authentication and prompts for the specific todo ID to delete. Does not perform the actual deletion in this code block; appears to be interactive/prompt-based.
    case 'delete_todo': { // Try to get token from args or stored token let token = args?.authToken as string; if (!token) { token = getStoredToken() || ''; } if (!token) { return { content: [ { type: 'text', text: `❌ No authentication token found. Please:\n1. Type "login" to get the authentication URL\n2. Complete login at http://localhost:3000\n3. Copy your token and use "save_token" to store it\n4. Then try "delete todo" again`, }, ], }; } const user = await verifyToken(token); if (!user) { return { content: [{ type: 'text', text: 'Error: Invalid authentication token' }], }; } // Get user's todos to show them const todos = await sql` SELECT * FROM todos WHERE user_id = ${user.userId} ORDER BY created_at DESC `; if (todos.length === 0) { return { content: [{ type: 'text', text: '❌ No todos found. Create a todo first!' }], }; } let todoList = '📋 **Your Todos:**\n\n'; todos.forEach((todo, index) => { todoList += `${index + 1}. **ID: ${todo.id}** - ${todo.title}\n`; if (todo.description) todoList += ` Description: ${todo.description}\n`; todoList += ` Status: ${todo.completed ? '✅ Completed' : '⏳ Pending'}\n\n`; }); return { content: [ { type: 'text', text: `${todoList}**Which todo would you like to delete?**\n\nPlease respond with the todo ID:\n\`\`\`\ntodoId: 1\n\`\`\``, }, ], }; }
  • src/server.ts:322-334 (registration)
    Registration of the 'delete_todo' tool in the ListTools response, including name, description, and input schema.
    { name: 'delete_todo', description: 'Delete a todo item with interactive prompts', inputSchema: { type: 'object', properties: { authToken: { type: 'string', description: 'Authentication token from Kinde (optional if saved)', }, }, }, },
  • Input schema definition for the 'delete_todo' tool, specifying optional authToken.
    inputSchema: { type: 'object', properties: { authToken: { type: 'string', description: 'Authentication token from Kinde (optional if saved)', }, }, },

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/sholajegede/todo_mcp_server'

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