Skip to main content
Glama

mark_task_done

Mark a completed task as done in TaskFlow MCP to update progress tables and trigger user approval before continuing 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 the completed task. Ask the user for approval before continuing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
taskIdYes
completedDetailsNo

Implementation Reference

  • Handler function for the 'mark_task_done' tool. Extracts parameters from args and delegates to TaskFlowService.markTaskDone.
    async mark_task_done(args: any) {
      const { requestId, taskId, completedDetails } = args ?? {};
      return service.markTaskDone(String(requestId), String(taskId), completedDetails);
    },
  • Input schema definition for the 'mark_task_done' tool, specifying required requestId and taskId, optional completedDetails.
    inputSchema: {
      type: "object",
      properties: {
        requestId: { type: "string" },
        taskId: { type: "string" },
        completedDetails: { type: "string" },
      },
      required: ["requestId", "taskId"],
    },
  • Tool registration: 'MARK_TASK_DONE_TOOL' is included in the list returned by listTools handler.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        PLAN_TASK_TOOL,
        GET_NEXT_TASK_TOOL,
        MARK_TASK_DONE_TOOL,
        OPEN_TASK_DETAILS_TOOL,
        LIST_REQUESTS_TOOL,
        ADD_TASKS_TO_REQUEST_TOOL,
        UPDATE_TASK_TOOL,
        DELETE_TASK_TOOL,
        ADD_SUBTASKS_TOOL,
        MARK_SUBTASK_DONE_TOOL,
        UPDATE_SUBTASK_TOOL,
        DELETE_SUBTASK_TOOL,
        EXPORT_TASK_STATUS_TOOL,
        ADD_NOTE_TOOL,
        UPDATE_NOTE_TOOL,
        DELETE_NOTE_TOOL,
        ADD_DEPENDENCY_TOOL,
        GET_PROMPTS_TOOL,
        SET_PROMPTS_TOOL,
        UPDATE_PROMPTS_TOOL,
        REMOVE_PROMPTS_TOOL,
        ARCHIVE_COMPLETED_REQUESTS_TOOL,
        LIST_ARCHIVED_REQUESTS_TOOL,
        RESTORE_ARCHIVED_REQUEST_TOOL,
      ],
    }));
  • Core service method implementing the logic: validates subtasks completed, marks task done, persists to file, generates progress table.
    public async markTaskDone(requestId: string, taskId: string, completedDetails?: string) {
      await this.loadTasks();
      const req = this.getRequest(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: "already_done", message: "Task is already marked done." };
    
      const hasSubtasks = task.subtasks.length > 0;
      const allSubtasksDone = task.subtasks.every((s) => s.done);
      if (hasSubtasks && !allSubtasksDone) {
        return {
          status: "subtasks_pending",
          message: "Cannot mark task as done until all subtasks are completed.",
          pendingSubtasks: task.subtasks.filter((s) => !s.done).map((s) => ({ id: s.id, title: s.title })),
        };
      }
    
      task.done = true;
      task.completedDetails = completedDetails || "";
      await this.saveTasks();
    
      const progressTable = formatTaskProgressTableForRequest(req);
      return {
        status: "task_marked_done",
        requestId: req.requestId,
        task: {
          id: task.id,
          title: task.title,
          description: task.description,
          completedDetails: task.completedDetails,
          subtasks: task.subtasks.map((s) => ({
            id: s.id,
            title: s.title,
            description: s.description,
            done: s.done,
          })),
        },
        message: `Task ${taskId} has been marked as done.\n${progressTable}`,
      };
    }
  • Shared JSON schema definition for 'mark_task_done' tool input validation (though inline schema is used in tool def).
    mark_task_done: {
      type: "object",
      properties: {
        requestId: { type: "string" },
        taskId: { type: "string" },
        completedDetails: { type: "string" },
      },
      required: ["requestId", "taskId"],
    },
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 of behavioral disclosure. It effectively describes key behaviors: it's a mutation operation (implied by 'mark as done'), triggers a progress table display, and enforces a workflow pause until user approval. It doesn't cover potential side effects like task status changes in related systems or error conditions, but provides substantial operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The description is front-loaded with the core purpose but becomes verbose with workflow instructions that might be better placed elsewhere. The three sentences vary in focus: first states the action, second describes an output behavior, third gives procedural constraints. While all content is relevant, the structure mixes operational details with core tool description.

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?

For a mutation tool with no annotations and no output schema, the description does well by explaining the action, parameters, immediate visual feedback (progress table), and critical workflow constraints. It misses details about return values, error handling, and the exact nature of the 'progress table', but provides sufficient context for basic safe usage given the complexity.

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

Parameters3/5

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

With 0% schema description coverage for 3 parameters, the description partially compensates by mentioning all parameters ('requestId', 'taskId', 'completedDetails') and indicating which are required vs. optional. However, it doesn't explain what these parameters represent (e.g., format of IDs, content of completedDetails) or provide examples, leaving significant semantic gaps.

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 action ('Mark a given task as done') and the resource ('task'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'mark_subtask_done' or 'update_task' which might have overlapping functionality, preventing a perfect score.

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 [a task]') and when not to use alternatives ('DO NOT proceed to 'get_next_task' again until the user has explicitly approved'). It also mentions the workflow context and user approval requirement, offering comprehensive usage instructions.

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/pinkpixel-dev/taskflow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server