Skip to main content
Glama

todo_complete

Mark checklist tasks as completed by specifying list and task titles to track progress and maintain organized workflows.

Instructions

Marca uma tarefa como concluída

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
listTitleYesTítulo da lista
taskTitleYesTítulo da tarefa

Implementation Reference

  • Handler for the 'todo_complete' tool. Parses input arguments using completeSchema, locates the specified checklist and task by title, toggles the task's completion status via checklistService.toggleItemComplete, and returns a success message.
    case "todo_complete": { console.error('DEBUG - Processing todo_complete'); const params = completeSchema.parse(args); const todoLists = await checklistService.getUserChecklists('current-user'); const todoList = todoLists.find(l => l.title === params.listTitle); if (!todoList) { throw new Error(`Lista não encontrada: ${params.listTitle}`); } const task = todoList.items.find(t => t.title === params.taskTitle); if (!task) { throw new Error(`Tarefa não encontrada: ${params.taskTitle}`); } await checklistService.toggleItemComplete(todoList.id, task.id); return { content: [{ type: "text", text: `Tarefa "${params.taskTitle}" marcada como completa!` }] }; }
  • Zod schema for validating input parameters of the todo_complete tool: listTitle and taskTitle.
    const completeSchema = z.object({ listTitle: z.string(), taskTitle: z.string() });
  • src/index.ts:145-156 (registration)
    Registration of the 'todo_complete' tool in the ListTools response, including name, description, and input schema.
    { name: "todo_complete", description: "Marca uma tarefa como concluída", inputSchema: { type: "object", properties: { listTitle: { type: "string", description: "Título da lista" }, taskTitle: { type: "string", description: "Título da tarefa" }, }, required: ["listTitle", "taskTitle"], }, },
  • Helper method in ChecklistService that toggles the completion status of a checklist item by updating it with the inverted completed flag.
    async toggleItemComplete(checklistId: string, itemId: string): Promise<ChecklistItem> { const checklist = await this.getChecklist(checklistId); const item = checklist.items.find(item => item.id === itemId); if (!item) { throw new Error(`Item not found: ${itemId}`); } return this.updateItem(checklistId, itemId, { completed: !item.completed }); }

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/hevener10/mcp-todo-checklist'

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