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,
      ],
    }));
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.

Install Server

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