Skip to main content
Glama

mark_task_done

Mark a task as completed in the TaskManager system. Update task status to done and display progress table after providing requestId and taskId. Requires user approval before proceeding to next tasks.

Instructions

Mark a given task as done after you've completed it. Provide 'requestId' and 'taskId', and optionally 'completedDetails'.

After marking a task as done, a progress table will be displayed showing the updated status of all tasks.

After this, DO NOT proceed to 'get_next_task' again until the user has explicitly approved this completed task using 'approve_task_completion'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
taskIdYes
completedDetailsNo

Implementation Reference

  • The core handler function for the 'mark_task_done' tool. It finds the request and task, marks the task as done, optionally sets completion details, saves the data, and returns a progress table.
    public async markTaskDone(
      requestId: string,
      taskId: string,
      completedDetails?: 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.done = true;
      if (completedDetails) {
        task.completedDetails = completedDetails;
      }
    
      await this.saveTasks();
    
      return {
        message:
          "Task marked as done. Awaiting approval.\n" +
          this.formatTaskProgressTable(requestId),
      };
    }
  • Dispatch handler in the callTool method that validates input using the schema and invokes the markTaskDone method.
    case "mark_task_done": {
      const parsed = MarkTaskDoneSchema.safeParse(parameters);
      if (!parsed.success) {
        throw new Error(`Invalid parameters: ${parsed.error}`);
      }
      return this.markTaskDone(
        parsed.data.requestId,
        parsed.data.taskId,
        parsed.data.completedDetails
      );
    }
  • Zod schema defining the input parameters for the mark_task_done tool: requestId, taskId, and optional completedDetails.
    const MarkTaskDoneSchema = z.object({
      requestId: z.string(),
      taskId: z.string(),
      completedDetails: z.string().optional(),
    });
  • index.ts:155-159 (registration)
    Tool registration in the listTools method, providing name, description, and input schema.
    {
      name: "mark_task_done",
      description: "Mark a task as completed.",
      inputSchema: MarkTaskDoneSchema,
    },
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it triggers a progress table display after execution and imposes a workflow constraint (waiting for user approval before using 'get_next_task'). However, it lacks details on error handling, permissions, or rate limits, which are common for mutation tools.

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 first sentence stating the purpose clearly. The subsequent sentences add necessary guidelines without redundancy. However, the phrasing could be slightly more streamlined, e.g., by combining related points into fewer sentences.

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 complexity (a mutation with workflow implications), no annotations, and no output schema, the description is fairly complete. It covers purpose, usage rules, and behavioral outcomes like the progress table display. It could improve by mentioning error cases or the exact format of the progress table, but it adequately supports agent decision-making.

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 schema description coverage is 0%, so the description must compensate. It adds meaning by specifying that 'requestId' and 'taskId' are required and 'completedDetails' is optional, and it implies the context of task completion. While it doesn't detail parameter formats or constraints, it provides essential usage context beyond the bare schema.

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 specific action ('Mark a given task as done') and resource ('task'), distinguishing it from siblings like 'update_task' or 'delete_task' by focusing on completion status. It explicitly mentions the required parameters ('requestId' and 'taskId'), reinforcing the purpose.

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 ('after you've completed it') and when not to proceed ('DO NOT proceed to 'get_next_task' again until the user has explicitly approved this completed task using 'approve_task_completion''). It names alternatives ('get_next_task', 'approve_task_completion') and sets clear prerequisites and post-conditions.

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