Skip to main content
Glama

approve_task_completion

Approve completed tasks in the MCP TaskManager workflow to verify genuine completion before proceeding to the next task in the queue.

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

  • The core handler function that locates the request and task by ID, sets the task's approved flag to true, persists the change, and returns a 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), }; }
  • Zod schema defining the input parameters: requestId and taskId as strings.
    const ApproveTaskCompletionSchema = z.object({ requestId: z.string(), taskId: z.string(), });
  • index.ts:160-164 (registration)
    Tool registration object returned by listTools(), specifying name, description, and input schema.
    { name: "approve_task_completion", description: "Approve a completed task.", inputSchema: ApproveTaskCompletionSchema, },
  • Dispatcher case in callTool method that validates input using the schema and invokes the 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 ); }

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