Skip to main content
Glama

update_task

Modify the title and/or description of uncompleted tasks in TaskFlow MCP. Display a progress table to confirm task updates for improved task management.

Instructions

Update an existing task's title and/or description. Only uncompleted tasks can be updated.

A progress table will be displayed showing the updated task information.

Input Schema

NameRequiredDescriptionDefault
descriptionNo
requestIdYes
taskIdYes
titleNo

Input Schema (JSON Schema)

{ "properties": { "description": { "type": "string" }, "requestId": { "type": "string" }, "taskId": { "type": "string" }, "title": { "type": "string" } }, "required": [ "requestId", "taskId" ], "type": "object" }

Implementation Reference

  • The MCP tool handler function that parses input arguments and delegates the update task logic to the TaskFlowService.
    async update_task(args: any) { const { requestId, taskId, title, description } = args ?? {}; return service.updateTask(String(requestId), String(taskId), { title, description }); },
  • JSON Schema definition for the update_task tool input validation.
    update_task: { type: "object", properties: { requestId: { type: "string" }, taskId: { type: "string" }, title: { type: "string" }, description: { type: "string" }, }, required: ["requestId", "taskId"], },
  • Registration of the update_task tool (UPDATE_TASK_TOOL) in the MCP server's listTools response.
    tools: [ PLAN_TASK_TOOL, GET_NEXT_TASK_TOOL, MARK_TASK_DONE_TOOL, OPEN_TASK_DETAILS_TOOL, LIST_REQUESTS_TOOL, ADD_TASKS_TO_REQUEST_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, ADD_SUBTASKS_TOOL, MARK_SUBTASK_DONE_TOOL, UPDATE_SUBTASK_TOOL, DELETE_SUBTASK_TOOL, EXPORT_TASK_STATUS_TOOL, ADD_NOTE_TOOL, UPDATE_NOTE_TOOL, DELETE_NOTE_TOOL, ADD_DEPENDENCY_TOOL, GET_PROMPTS_TOOL, SET_PROMPTS_TOOL, UPDATE_PROMPTS_TOOL, REMOVE_PROMPTS_TOOL, ARCHIVE_COMPLETED_REQUESTS_TOOL, LIST_ARCHIVED_REQUESTS_TOOL, RESTORE_ARCHIVED_REQUEST_TOOL, ],
  • Core service method implementing the task update logic: loads data, validates, updates title/description if not done, saves, and returns formatted response with progress table.
    public async updateTask( requestId: string, taskId: string, updates: { title?: string; description?: string } ) { await this.loadTasks(); const req = this.getRequest(requestId); if (!req) return { status: "error", message: "Request not found" }; const task = req.tasks.find((t) => t.id === taskId); if (!task) return { status: "error", message: "Task not found" }; if (task.done) return { status: "error", message: "Cannot update completed task" }; if (updates.title) task.title = sanitizeString(updates.title); if (updates.description) task.description = sanitizeString(updates.description); await this.saveTasks(); const progressTable = formatTaskProgressTableForRequest(req); return { status: "task_updated", message: `Task ${taskId} has been updated.\n${progressTable}`, task: { id: task.id, title: task.title, description: task.description }, }; }
  • Tool definition export (UPDATE_TASK_TOOL) including name, description, and input schema, imported and registered in the server.
    export const UPDATE_TASK_TOOL: Tool = { name: "update_task", description: "Update an existing task's title and/or description. Only uncompleted tasks can be updated.\n\n" + "A progress table will be displayed showing the updated task information.", inputSchema: { type: "object", properties: { requestId: { type: "string" }, taskId: { type: "string" }, title: { type: "string" }, description: { type: "string" }, }, required: ["requestId", "taskId"], }, };

Other Tools

Related 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/pinkpixel-dev/taskflow-mcp'

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