Skip to main content
Glama
Rudra-ravi

MCP TaskManager

by Rudra-ravi

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);
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
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. It discloses that the tool 'finalizes' and 'confirms' completion, implying a write/mutation operation, and mentions a 'progress table' will be displayed before approval. However, it lacks details on permissions, side effects (e.g., if it locks the request), or response format. The description adds some behavioral context but is incomplete 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.

Conciseness5/5

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

The description is appropriately sized and front-loaded, with the first sentence stating the core purpose. Each subsequent sentence adds value: the second explains a behavioral detail (progress table), and the third provides usage alternatives. There is no wasted text, and the structure flows logically from purpose to context.

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), no annotations, no output schema, and low schema coverage, the description is moderately complete. It covers the purpose, prerequisites, and some behavioral aspects but lacks details on permissions, side effects, return values, and explicit parameter guidance. It is adequate but has clear gaps for a tool of this nature.

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

Parameters4/5

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

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It does not explicitly mention the 'requestId' parameter, but contextually implies it by referring to 'the entire request' and 'request_planning'. The description adds meaning by explaining the tool's purpose and prerequisites, which helps infer parameter usage, though it does not detail the parameter's format or constraints.

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' after 'all tasks are done and approved', with the specific action being to 'confirm that the request is fully completed'. It uses a specific verb ('finalizes') and resource ('request'), but does not explicitly distinguish it from siblings like 'approve_task_completion' beyond implying it's for the entire request versus individual tasks.

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 on when to use it: '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'. However, it does not explicitly state when NOT to use it (e.g., before tasks are complete) or compare it to all relevant siblings like 'approve_task_completion'.

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