Skip to main content
Glama

approve_task_completion

Confirm task completion in the MCP TaskManager system to proceed to the next task. Review progress table, approve, or request changes before moving forward.

Instructions

Once the assistant has marked a task as done using 'mark_task_done', the user must call this tool to approve that the task is genuinely completed. Only after this approval can you proceed to 'get_next_task' to move on.

A progress table will be displayed before requesting approval, showing the current status of all tasks.

If the user does not approve, do not call 'get_next_task'. Instead, the user may request changes, or even re-plan tasks by using 'request_planning' again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
taskIdYes

Implementation Reference

  • Core handler function that locates the request and task, sets the task as approved, persists the data, and returns an updated task progress table.
    public async approveTaskCompletion(requestId: string, taskId: 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.approved = true; await this.saveTasks(); return { message: "Task completion approved.\n" + this.formatTaskProgressTable(requestId), }; }
  • Tool dispatcher in the callTool method: validates parameters using the schema and invokes the specific approveTaskCompletion handler.
    case "approve_task_completion": { const parsed = ApproveTaskCompletionSchema.safeParse(parameters); if (!parsed.success) { throw new Error(`Invalid parameters: ${parsed.error}`); } return this.approveTaskCompletion( parsed.data.requestId, parsed.data.taskId ); }
  • Zod schema defining the input parameters: requestId (string) and taskId (string).
    const ApproveTaskCompletionSchema = z.object({ requestId: z.string(), taskId: z.string(), });
  • index.ts:160-164 (registration)
    Tool registration object returned by listTools(), including name, description, and reference to the input schema.
    { name: "approve_task_completion", description: "Approve a completed task.", inputSchema: ApproveTaskCompletionSchema, },

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