Skip to main content
Glama

mark_task_done

Mark a task as completed in MCP TaskManager by providing requestId and taskId, optionally adding completedDetails. Updates task progress and waits for approval before proceeding to the next task.

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 this completed task using 'approve_task_completion'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
completedDetailsNo
requestIdYes
taskIdYes

Implementation Reference

  • The core handler function that locates the task by requestId and taskId, sets it as done, optionally updates completion details, persists the data, and returns a progress table message.
    public async markTaskDone( requestId: string, taskId: string, completedDetails?: string ) { const request = this.data.requests.find((r) => r.requestId === requestId); if (!request) { throw new Error("Request not found"); } const task = request.tasks.find((t) => t.id === taskId); if (!task) { throw new Error("Task not found"); } task.done = true; if (completedDetails) { task.completedDetails = completedDetails; } await this.saveTasks(); return { message: "Task marked as done. Awaiting approval.\n" + this.formatTaskProgressTable(requestId), }; }
  • Zod schema defining the input parameters for the mark_task_done tool: requestId, taskId, and optional completedDetails.
    const MarkTaskDoneSchema = z.object({ requestId: z.string(), taskId: z.string(), completedDetails: z.string().optional(), });
  • index.ts:155-159 (registration)
    Tool registration in the listTools method, providing name, description, and input schema.
    { name: "mark_task_done", description: "Mark a task as completed.", inputSchema: MarkTaskDoneSchema, },
  • Dispatch handler in callTool method that validates input using the schema and delegates to the markTaskDone method.
    case "mark_task_done": { const parsed = MarkTaskDoneSchema.safeParse(parameters); if (!parsed.success) { throw new Error(`Invalid parameters: ${parsed.error}`); } return this.markTaskDone( parsed.data.requestId, parsed.data.taskId, parsed.data.completedDetails );

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/Rudra-ravi/mcp-taskmanager'

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