Skip to main content
Glama

list_todos

Retrieve all todo items for the authenticated user to view current tasks and track progress in your todo management system.

Instructions

List all todos for the authenticated user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authTokenNoAuthentication token from Kinde (optional if saved)

Implementation Reference

  • Handler for the 'list_todos' tool: authenticates user via token, queries PostgreSQL for todos belonging to the user ordered by creation date descending, returns JSON list.
    case 'list_todos': { // 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 "list todos" again`, }, ], }; } const user = await verifyToken(token); if (!user) { return { content: [{ type: 'text', text: 'Error: Invalid authentication token' }], }; } const todos = await sql` SELECT * FROM todos WHERE user_id = ${user.userId} ORDER BY created_at DESC `; return { content: [{ type: 'text', text: JSON.stringify({ success: true, todos }, null, 2) }], }; }
  • src/server.ts:243-255 (registration)
    Registration of the 'list_todos' tool in the listTools response, including name, description, and input schema.
    { name: 'list_todos', description: 'List all todos for the authenticated user', inputSchema: { type: 'object', properties: { authToken: { type: 'string', description: 'Authentication token from Kinde (optional if saved)', }, }, }, },
  • Input schema definition for the 'list_todos' tool, specifying optional authToken parameter.
    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