Skip to main content
Glama

mark_task_done

Mark a task as completed in the TaskManager system. Update task status to done and display progress table after providing requestId and taskId. Requires user approval before proceeding 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 this completed task using 'approve_task_completion'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
taskIdYes
completedDetailsNo

Implementation Reference

  • The core handler function for the 'mark_task_done' tool. It finds the request and task, marks the task as done, optionally sets completion details, saves the data, and returns a progress table.
    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), }; }
  • Dispatch handler in the callTool method that validates input using the schema and invokes 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 ); }
  • 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, },

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