Skip to main content
Glama
kazuph

@kazuph/mcp-taskmanager

by kazuph

approve_task_completion

Mark a task as completed after verification using the task ID and request ID. View progress table before approving to ensure task completion. Proceed to next task only after approval.

Instructions

Once the assistant has marked a task as done using 'mark_task_done', the user must call this tool to approve that the task is genuinely completed. Only after this approval can you proceed to 'get_next_task' to move on.

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

If the user does not approve, do not call 'get_next_task'. Instead, the user may request changes, or even re-plan tasks by using 'request_planning' again.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
taskIdYes

Implementation Reference

  • Core handler method in TaskManagerServer class that approves a task completion by marking it as approved after validation, updates the data file, and returns the status.
    public async approveTaskCompletion(requestId: string, taskId: string) {
      await this.loadTasks();
      const req = this.data.requests.find((r) => r.requestId === requestId);
      if (!req) return { status: "error", message: "Request not found" };
      const task = req.tasks.find((t) => t.id === taskId);
      if (!task) return { status: "error", message: "Task not found" };
      if (!task.done) return { status: "error", message: "Task not done yet." };
      if (task.approved)
        return { status: "already_approved", message: "Task already approved." };
    
      task.approved = true;
      await this.saveTasks();
      return {
        status: "task_approved",
        requestId: req.requestId,
        task: {
          id: task.id,
          title: task.title,
          description: task.description,
          completedDetails: task.completedDetails,
          approved: task.approved,
        },
      };
    }
  • MCP server dispatch handler for the tool: parses input with schema and invokes the core approveTaskCompletion method.
    case "approve_task_completion": {
      const parsed = ApproveTaskCompletionSchema.safeParse(args);
      if (!parsed.success) {
        throw new Error(`Invalid arguments: ${parsed.error}`);
      }
      const { requestId, taskId } = parsed.data;
      const result = await taskManagerServer.approveTaskCompletion(
        requestId,
        taskId
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Zod schema defining input parameters: requestId and taskId.
    const ApproveTaskCompletionSchema = z.object({
      requestId: z.string(),
      taskId: z.string(),
    });
  • index.ts:171-185 (registration)
    Tool object registration defining name, detailed description, and input schema.
    const APPROVE_TASK_COMPLETION_TOOL: Tool = {
      name: "approve_task_completion",
      description:
        "Once the assistant has marked a task as done using 'mark_task_done', the user must call this tool to approve that the task is genuinely completed. Only after this approval can you proceed to 'get_next_task' to move on.\n\n" +
        "A progress table will be displayed before requesting approval, showing the current status of all tasks.\n\n" +
        "If the user does not approve, do not call 'get_next_task'. Instead, the user may request changes, or even re-plan tasks by using 'request_planning' again.",
      inputSchema: {
        type: "object",
        properties: {
          requestId: { type: "string" },
          taskId: { type: "string" },
        },
        required: ["requestId", "taskId"],
      },
    };
  • index.ts:684-696 (registration)
    Registration in the listTools handler, including APPROVE_TASK_COMPLETION_TOOL in the exported tools list.
      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 of behavioral disclosure. It effectively describes the tool's role in a workflow (approval after marking done) and consequences (proceeding to 'get_next_task' only after approval). However, it lacks details on error handling, response format, or side effects like whether approval is reversible. The description adds meaningful context but doesn't fully cover behavioral traits.

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 well-structured and front-loaded with the core purpose. Each sentence adds value: the first explains the tool's role, the second mentions the progress table, and the third covers alternative actions. It could be slightly more concise by integrating the progress table mention into the workflow explanation, but overall it's efficient with minimal waste.

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

Completeness4/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description provides good contextual completeness. It explains the tool's place in a workflow, prerequisites, and consequences. However, it doesn't detail what happens upon successful approval (e.g., state changes) or error cases, leaving some gaps for a tool with mutation implications.

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 0% description coverage, so the description must compensate. While it doesn't explicitly explain the 'requestId' and 'taskId' parameters, it implicitly clarifies their purpose by describing the approval process for a specific task within a request context. This adds semantic meaning beyond the bare schema, though it could be more explicit about parameter roles.

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

Purpose5/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: 'the user must call this tool to approve that the task is genuinely completed' after using 'mark_task_done'. It specifies the verb (approve) and resource (task completion), and distinguishes it from sibling tools like 'approve_request_completion' by focusing on task-level approval rather than request-level.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'Once the assistant has marked a task as done using 'mark_task_done', the user must call this tool to approve that the task is genuinely completed.' It also specifies alternatives and exclusions: 'If the user does not approve, do not call 'get_next_task'. Instead, the user may request changes, or even re-plan tasks by using 'request_planning' again.'

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