Skip to main content
Glama

update_task

Modify existing tasks by updating their title, description, status, or priority to maintain accurate productivity tracking within the TodoPomo system.

Instructions

Update an existing task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID
titleNoNew title
descriptionNoNew description
statusNoNew status
priorityNoNew priority

Implementation Reference

  • Handler function for the 'update_task' tool. It locates the task by ID, updates specified fields (title, description, status, priority), sets completion timestamp if status is 'completed', persists changes to data file, and returns the updated task or error if not found.
    case "update_task": { const taskIndex = data.tasks.findIndex((t) => t.id === args.taskId); if (taskIndex === -1) { return { content: [ { type: "text", text: JSON.stringify({ success: false, error: "Task not found" }), }, ], }; } const task = data.tasks[taskIndex]; if (args.title) task.title = args.title as string; if (args.description) task.description = args.description as string; if (args.status) { task.status = args.status as "pending" | "in-progress" | "completed"; if (args.status === "completed") { task.completedAt = new Date().toISOString(); } } if (args.priority) task.priority = args.priority as "low" | "medium" | "high"; saveData(data); return { content: [ { type: "text", text: JSON.stringify( { success: true, task, message: "Task updated successfully" }, null, 2 ), }, ], }; }
  • Input schema definition for the 'update_task' tool, including name, description, properties (taskId required, others optional), enums for status and priority.
    { name: "update_task", description: "Update an existing task", inputSchema: { type: "object", properties: { taskId: { type: "string", description: "Task ID" }, title: { type: "string", description: "New title" }, description: { type: "string", description: "New description" }, status: { type: "string", enum: ["pending", "in-progress", "completed"], description: "New status", }, priority: { type: "string", enum: ["low", "medium", "high"], description: "New priority", }, }, required: ["taskId"], }, },
  • src/index.ts:245-247 (registration)
    Registration of the ListTools handler that exposes all tools including 'update_task' via the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));

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/PratyayRajak/todopomo-mcp'

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