Skip to main content
Glama

approve_task_completion

Approve completed tasks in the MCP TaskManager workflow to verify genuine completion before proceeding to the next task in the queue.

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

  • The core handler function that locates the request and task by ID, sets the task's approved flag to true, persists the change, and returns a progress table.
    public async approveTaskCompletion(requestId: string, taskId: string) {
      const request = this.data.requests.find((r) => r.requestId === requestId);
      if (!request) {
        throw new Error("Request not found");
      }
    
      const task = request.tasks.find((t) => t.id === taskId);
      if (!task) {
        throw new Error("Task not found");
      }
    
      task.approved = true;
    
      await this.saveTasks();
    
      return {
        message:
          "Task completion approved.\n" + this.formatTaskProgressTable(requestId),
      };
    }
  • Zod schema defining the input parameters: requestId and taskId as strings.
    const ApproveTaskCompletionSchema = z.object({
      requestId: z.string(),
      taskId: z.string(),
    });
  • index.ts:160-164 (registration)
    Tool registration object returned by listTools(), specifying name, description, and input schema.
    {
      name: "approve_task_completion",
      description: "Approve a completed task.",
      inputSchema: ApproveTaskCompletionSchema,
    },
  • Dispatcher case in callTool method that validates input using the schema and invokes the handler.
    case "approve_task_completion": {
      const parsed = ApproveTaskCompletionSchema.safeParse(parameters);
      if (!parsed.success) {
        throw new Error(`Invalid parameters: ${parsed.error}`);
      }
      return this.approveTaskCompletion(
        parsed.data.requestId,
        parsed.data.taskId
      );
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses key behavioral traits: it's an approval step in a workflow, triggers a progress table display, and has conditional outcomes (approval leads to 'get_next_task', disapproval may lead to changes or re-planning). However, it doesn't cover permissions, rate limits, or detailed response behavior.

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 and sequence. Every sentence adds value: the first explains the tool's role, the second mentions the progress table, and the third covers disapproval handling. Minor verbosity in the last sentence slightly reduces efficiency.

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 no annotations, 0% schema coverage, and no output schema, the description does well on workflow context but has gaps. It explains when and why to use the tool and ties into sibling tools, but lacks parameter details, return values, and full behavioral transparency (e.g., error cases).

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

Parameters2/5

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

Schema description coverage is 0% for 2 parameters (requestId, taskId), and the description adds no meaning about what these parameters represent, their format, or how to obtain them. It fails to compensate for the schema's lack of documentation, leaving parameters unexplained.

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 distinguishes from siblings by specifying this approval step is required before 'get_next_task' can be used, making the verb+resource+sequence explicit.

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?

Explicit guidance is provided: use after 'mark_task_done', before 'get_next_task', and not to use if the user does not approve. Alternatives are named ('request_planning' for re-planning), and exclusions are clear (do not call 'get_next_task' without approval).

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