Skip to main content
Glama

approve_request_completion

Finalize completed requests in MCP TaskManager by confirming all tasks are done and approved, displaying final status before completion.

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

  • The core handler function that approves the completion of the entire request after verifying all tasks are approved. It sets the request to completed and returns a success message with progress table.
    public async approveRequestCompletion(requestId: string) { const request = this.data.requests.find((r) => r.requestId === requestId); if (!request) { throw new Error("Request not found"); } if (!request.tasks.every((t) => t.approved)) { throw new Error("Not all tasks are approved yet"); } request.completed = true; await this.saveTasks(); return { message: "Request completion approved. All done!\n" + this.formatTaskProgressTable(requestId), }; }
  • Zod input schema for the tool, requiring a 'requestId' string parameter.
    const ApproveRequestCompletionSchema = z.object({ requestId: z.string(), });
  • index.ts:165-169 (registration)
    Registration of the tool in the listTools() method, specifying name, description, and input schema.
    { name: "approve_request_completion", description: "Approve the completion of an entire request.", inputSchema: ApproveRequestCompletionSchema, },
  • Dispatch logic in the callTool switch statement that validates input using the schema and invokes the handler.
    case "approve_request_completion": { const parsed = ApproveRequestCompletionSchema.safeParse(parameters); if (!parsed.success) { throw new Error(`Invalid parameters: ${parsed.error}`); } return this.approveRequestCompletion(parsed.data.requestId); }

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