Skip to main content
Glama

mark_subtask_done

Mark a subtask as completed to update task progress. Requires requestId, taskId, and subtaskId to track completion status across all tasks.

Instructions

Mark a subtask as done. Provide 'requestId', 'taskId', and 'subtaskId'.

A progress table will be displayed showing the updated status of all tasks and subtasks.

All subtasks must be completed before a task can be marked as done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
taskIdYes
subtaskIdYes

Implementation Reference

  • MCP tool handler: extracts arguments (requestId, taskId, subtaskId) from input and delegates execution to TaskFlowService.markSubtaskDone
    async mark_subtask_done(args: any) {
      const { requestId, taskId, subtaskId } = args ?? {};
      return service.markSubtaskDone(String(requestId), String(taskId), String(subtaskId));
    },
  • Core implementation: loads task data, validates request/task/subtask existence, marks subtask as done, persists changes to file, generates and returns progress table with status
    public async markSubtaskDone(requestId: string, taskId: string, subtaskId: 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" };
    
      const subtask = task.subtasks.find((s) => s.id === subtaskId);
      if (!subtask) return { status: "error", message: "Subtask not found" };
      if (subtask.done) return { status: "already_done", message: "Subtask is already marked done" };
    
      subtask.done = true;
      await this.saveTasks();
    
      const progressTable = formatTaskProgressTableForRequest(req);
      return {
        status: "subtask_marked_done",
        message: `Subtask ${subtaskId} has been marked as done.\n${progressTable}`,
        subtask: { id: subtask.id, title: subtask.title, description: subtask.description, done: subtask.done },
        allSubtasksDone: task.subtasks.every((s) => s.done),
      };
    }
  • JSON Schema for tool input validation: requires requestId, taskId, subtaskId as strings
    mark_subtask_done: {
      type: "object",
      properties: {
        requestId: { type: "string" },
        taskId: { type: "string" },
        subtaskId: { type: "string" },
      },
      required: ["requestId", "taskId", "subtaskId"],
    },
  • Tool registration: MARK_SUBTASK_DONE_TOOL included in the list of tools returned by ListToolsRequestHandler
    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,
      ],
    }));
  • Tool object definition: exports the Tool spec with name, description, and inputSchema for use in server registration and handler binding
    export const MARK_SUBTASK_DONE_TOOL: Tool = {
      name: "mark_subtask_done",
      description:
        "Mark a subtask as done. Provide 'requestId', 'taskId', and 'subtaskId'.\n\n" +
        "A progress table will be displayed showing the updated status of all tasks and subtasks.\n\n" +
        "All subtasks must be completed before a task can be marked as done.",
      inputSchema: {
        type: "object",
        properties: {
          requestId: { type: "string" },
          taskId: { type: "string" },
          subtaskId: { type: "string" },
        },
        required: ["requestId", "taskId", "subtaskId"],
      },
    };
Behavior2/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 states that marking a subtask as done triggers a progress table display and mentions workflow constraints, but doesn't cover critical aspects like whether this is a destructive/mutative operation (implied by 'mark as done'), permission requirements, error conditions, or what happens if subtasks aren't completed. The behavioral context 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.

Conciseness4/5

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

The description is appropriately sized with three sentences that each serve a purpose: stating the core action, describing the visual feedback, and providing workflow context. It's front-loaded with the primary function. While efficient, the third sentence about task completion could be slightly more integrated with the first sentence for better flow.

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

Completeness2/5

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

Given a mutation tool with 3 parameters (0% schema coverage), no annotations, and no output schema, the description is insufficient. It covers the basic action and some behavioral effects but lacks details on parameter semantics, error handling, return values, and full behavioral implications. The context provided doesn't adequately compensate for the missing structured information.

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%, so the description must compensate. It lists the three required parameters ('requestId', 'taskId', 'subtaskId') but provides no semantic context about what these IDs represent, their format, how to obtain them, or their relationships. The description adds minimal value beyond naming the parameters, failing to address the complete lack of schema documentation.

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 verb 'mark' and resource 'subtask' with the specific action 'as done', making the purpose immediately understandable. It distinguishes from sibling tools like 'mark_task_done' by specifying subtask-level operation. However, it doesn't explicitly contrast with other subtask-related tools like 'update_subtask' or 'delete_subtask' beyond the 'done' action.

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

Usage Guidelines3/5

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

The description implies usage context through the statement 'All subtasks must be completed before a task can be marked as done,' suggesting this tool is part of a workflow sequence. However, it doesn't provide explicit guidance on when to use this vs. alternatives like 'update_subtask' for status changes or 'mark_task_done' for parent tasks, nor does it specify prerequisites beyond the required parameters.

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