Skip to main content
Glama

mark_task_done

Mark a completed task as done in TaskFlow MCP to update progress tables and trigger user approval before continuing to next tasks.

Instructions

Mark a given task as done after you've completed it. Provide 'requestId' and 'taskId', and optionally 'completedDetails'.

After marking a task as done, a progress table will be displayed showing the updated status of all tasks.

After this, DO NOT proceed to 'get_next_task' again until the user has explicitly approved the completed task. Ask the user for approval before continuing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
taskIdYes
completedDetailsNo

Implementation Reference

  • Handler function for the 'mark_task_done' tool. Extracts parameters from args and delegates to TaskFlowService.markTaskDone.
    async mark_task_done(args: any) { const { requestId, taskId, completedDetails } = args ?? {}; return service.markTaskDone(String(requestId), String(taskId), completedDetails); },
  • Input schema definition for the 'mark_task_done' tool, specifying required requestId and taskId, optional completedDetails.
    inputSchema: { type: "object", properties: { requestId: { type: "string" }, taskId: { type: "string" }, completedDetails: { type: "string" }, }, required: ["requestId", "taskId"], },
  • Tool registration: 'MARK_TASK_DONE_TOOL' is included in the list returned by listTools handler.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ 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 logic: validates subtasks completed, marks task done, persists to file, generates progress table.
    public async markTaskDone(requestId: string, taskId: string, completedDetails?: 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: "already_done", message: "Task is already marked done." }; const hasSubtasks = task.subtasks.length > 0; const allSubtasksDone = task.subtasks.every((s) => s.done); if (hasSubtasks && !allSubtasksDone) { return { status: "subtasks_pending", message: "Cannot mark task as done until all subtasks are completed.", pendingSubtasks: task.subtasks.filter((s) => !s.done).map((s) => ({ id: s.id, title: s.title })), }; } task.done = true; task.completedDetails = completedDetails || ""; await this.saveTasks(); const progressTable = formatTaskProgressTableForRequest(req); return { status: "task_marked_done", requestId: req.requestId, task: { id: task.id, title: task.title, description: task.description, completedDetails: task.completedDetails, subtasks: task.subtasks.map((s) => ({ id: s.id, title: s.title, description: s.description, done: s.done, })), }, message: `Task ${taskId} has been marked as done.\n${progressTable}`, }; }
  • Shared JSON schema definition for 'mark_task_done' tool input validation (though inline schema is used in tool def).
    mark_task_done: { type: "object", properties: { requestId: { type: "string" }, taskId: { type: "string" }, completedDetails: { type: "string" }, }, required: ["requestId", "taskId"], },

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