Skip to main content
Glama
kazuph

@kazuph/mcp-taskmanager

by kazuph

approve_request_completion

Finalizes and approves completed requests in the MCP task manager. Displays a progress table for task status before confirmation. If not approved, use the 'request_planning' tool to add tasks and continue the process.

Instructions

After all tasks are done and approved, this tool finalizes the entire request. The user must call this to confirm that the request is fully completed.

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

If not approved, the user can add new tasks using 'request_planning' and continue the process.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes

Implementation Reference

  • Core handler function that approves and marks the entire request as completed after verifying all tasks are done and approved.
    public async approveRequestCompletion(requestId: string) { await this.loadTasks(); const req = this.data.requests.find((r) => r.requestId === requestId); if (!req) return { status: "error", message: "Request not found" }; // Check if all tasks are done and approved const allDone = req.tasks.every((t) => t.done); if (!allDone) { return { status: "error", message: "Not all tasks are done." }; } const allApproved = req.tasks.every((t) => t.done && t.approved); if (!allApproved) { return { status: "error", message: "Not all done tasks are approved." }; } req.completed = true; await this.saveTasks(); return { status: "request_approved_complete", requestId: req.requestId, message: "Request is fully completed and approved.", }; }
  • Zod schema defining the input structure for the approve_request_completion tool (requires requestId).
    const ApproveRequestCompletionSchema = z.object({ requestId: z.string(), });
  • index.ts:187-200 (registration)
    Tool registration object defining name, description, and input schema for listTools response.
    const APPROVE_REQUEST_COMPLETION_TOOL: Tool = { name: "approve_request_completion", description: "After all tasks are done and approved, this tool finalizes the entire request. The user must call this to confirm that the request is fully completed.\n\n" + "A progress table showing the final status of all tasks will be displayed before requesting final approval.\n\n" + "If not approved, the user can add new tasks using 'request_planning' and continue the process.", inputSchema: { type: "object", properties: { requestId: { type: "string" }, }, required: ["requestId"], }, };
  • Dispatcher case in CallToolRequestSchema handler that validates input and calls the core approveRequestCompletion method.
    case "approve_request_completion": { const parsed = ApproveRequestCompletionSchema.safeParse(args); if (!parsed.success) { throw new Error(`Invalid arguments: ${parsed.error}`); } const { requestId } = parsed.data; const result = await taskManagerServer.approveRequestCompletion(requestId); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
  • index.ts:683-696 (registration)
    Registers the approve_request_completion tool (via APPROVE_REQUEST_COMPLETION_TOOL) in the list of available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ REQUEST_PLANNING_TOOL, GET_NEXT_TASK_TOOL, MARK_TASK_DONE_TOOL, APPROVE_TASK_COMPLETION_TOOL, APPROVE_REQUEST_COMPLETION_TOOL, OPEN_TASK_DETAILS_TOOL, LIST_REQUESTS_TOOL, ADD_TASKS_TO_REQUEST_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, ], }));

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

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