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);
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes key behaviors: it 'finalizes' the request (implying a write/mutation), displays a 'progress table' before approval, and allows continuation via 'request_planning' if not approved. However, it lacks details on permissions, side effects, or error handling, which are important for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the core purpose stated in the first sentence. Each sentence adds value: the first explains the action, the second describes a behavioral step (displaying a table), and the third provides an alternative flow. There is minimal waste, though it could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation to finalize a request with dependencies on tasks), no annotations, no output schema, and low schema coverage, the description is moderately complete. It covers the purpose, usage context, and some behavioral aspects but lacks details on parameters, return values, and full behavioral transparency, leaving gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter (requestId) with 0% description coverage, so the description must compensate. It does not explicitly mention the 'requestId' parameter or explain its semantics, such as what format it expects or where to obtain it. The description implies context about tasks and approval but adds no specific parameter information beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'finalizes the entire request' and 'confirm that the request is fully completed.' It specifies the action (finalize/confirm) and resource (request), but does not explicitly distinguish it from sibling tools like 'approve_task_completion' or 'mark_task_done,' which handle individual tasks rather than the entire request.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: 'After all tasks are done and approved' and 'to confirm that the request is fully completed.' It also mentions an alternative action if not approved: 'add new tasks using 'request_planning' and continue the process.' However, it does not explicitly state when NOT to use it or compare it directly to all sibling alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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