Skip to main content
Glama

update_subtask

Modify uncompleted subtasks by updating their title or description. Input 'requestId', 'taskId', 'subtaskId', and optional fields. View progress with updated task details.

Instructions

Update a subtask's title or description. Provide 'requestId', 'taskId', 'subtaskId', and optionally 'title' and/or 'description'.

Only uncompleted subtasks can be updated.

A progress table will be displayed showing the updated task with its subtasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNo
requestIdYes
subtaskIdYes
taskIdYes
titleNo

Implementation Reference

  • MCP tool handler function for 'update_subtask'. Extracts parameters from args and delegates to TaskFlowService.updateSubtask method.
    async update_subtask(args: any) { const { requestId, taskId, subtaskId, title, description } = args ?? {}; return service.updateSubtask(String(requestId), String(taskId), String(subtaskId), { title, description }); },
  • Core service method implementing subtask update logic: loads data, validates request/task/subtask exist and subtask not done, sanitizes and applies updates, saves file, generates progress table.
    public async updateSubtask( requestId: string, taskId: string, subtaskId: 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" }; const subtask = task.subtasks.find((s) => s.id === subtaskId); if (!subtask) return { status: "error", message: "Subtask not found" }; if (subtask.done) return { status: "error", message: "Cannot update completed subtask" }; if (updates.title) subtask.title = sanitizeString(updates.title); if (updates.description) subtask.description = sanitizeString(updates.description); await this.saveTasks(); const progressTable = formatTaskProgressTableForRequest(req); return { status: "subtask_updated", message: `Subtask ${subtaskId} has been updated.\n${progressTable}`, subtask: { id: subtask.id, title: subtask.title, description: subtask.description, done: subtask.done }, }; }
  • JSON Schema defining the input parameters for the 'update_subtask' tool.
    update_subtask: { type: "object", properties: { requestId: { type: "string" }, taskId: { type: "string" }, subtaskId: { type: "string" }, title: { type: "string" }, description: { type: "string" }, }, required: ["requestId", "taskId", "subtaskId"], },
  • Tool object definition including name, description, and inputSchema for 'update_subtask', exported and used in server registration.
    export const UPDATE_SUBTASK_TOOL: Tool = { name: "update_subtask", description: "Update a subtask's title or description. Provide 'requestId', 'taskId', 'subtaskId', and optionally 'title' and/or 'description'.\n\n" + "Only uncompleted subtasks can be updated.\n\n" + "A progress table will be displayed showing the updated task with its subtasks.", inputSchema: { type: "object", properties: { requestId: { type: "string" }, taskId: { type: "string" }, subtaskId: { type: "string" }, title: { type: "string" }, description: { type: "string" }, }, required: ["requestId", "taskId", "subtaskId"], }, };
  • Registration of UPDATE_SUBTASK_TOOL in the server's list of available tools returned by listTools.
    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, ],

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