Skip to main content
Glama

update_todo

Modify existing todo items by updating their title, description, or completion status to keep task lists current and organized.

Instructions

Update an existing todo item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authTokenYesAuthentication token from Kinde
completedNoCompletion status of the todo
descriptionNoNew description for the todo
titleNoNew title for the todo
todoIdYesID of the todo to update

Implementation Reference

  • Handler for the 'update_todo' tool. Lists the user's todos and prompts for the todo ID and new details to update interactively. Does not perform the update in this call; expects parameters in subsequent interactions.
    case 'update_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 "update 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 update?**\n\nPlease respond with the todo ID and new details in this format:\n\`\`\`\ntodoId: 1\ntitle: New title (optional)\ndescription: New description (optional)\ncompleted: true (optional)\n\`\`\``, }, ], }; }
  • src/server.ts:309-321 (registration)
    Registration of the 'update_todo' tool in the ListTools response, including its description and input schema.
    { name: 'update_todo', description: 'Update an existing 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 'update_todo' tool, specifying optional authToken parameter.
    { name: 'update_todo', description: 'Update an existing todo item with interactive prompts', 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