Skip to main content
Glama
kazuph

@kazuph/mcp-taskmanager

by kazuph

mark_task_done

Mark a specific task as completed by providing 'requestId' and 'taskId'; optionally include 'completedDetails'. Displays an updated progress table and requires task approval via 'approve_task_completion' before proceeding further.

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
completedDetailsNo
requestIdYes
taskIdYes

Implementation Reference

  • The core handler function in TaskManagerServer that executes the logic for marking a task as done: loads data, finds the task, sets done=true and completedDetails, saves to file, returns status.
    public async markTaskDone(
      requestId: string,
      taskId: string,
      completedDetails?: 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: "already_done",
          message: "Task is already marked done.",
        };
    
      task.done = true;
      task.completedDetails = completedDetails || "";
      await this.saveTasks();
      return {
        status: "task_marked_done",
        requestId: req.requestId,
        task: {
          id: task.id,
          title: task.title,
          description: task.description,
          completedDetails: task.completedDetails,
          approved: task.approved,
        },
      };
    }
  • The MCP server request handler (switch case) for 'mark_task_done': parses input arguments using the schema, calls the core markTaskDone method, and formats the response.
    case "mark_task_done": {
      const parsed = MarkTaskDoneSchema.safeParse(args);
      if (!parsed.success) {
        throw new Error(`Invalid arguments: ${parsed.error}`);
      }
      const { requestId, taskId, completedDetails } = parsed.data;
      const result = await taskManagerServer.markTaskDone(
        requestId,
        taskId,
        completedDetails
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Zod schema for validating input parameters of the mark_task_done tool: requestId, taskId, optional completedDetails.
    const MarkTaskDoneSchema = z.object({
      requestId: z.string(),
      taskId: z.string(),
      completedDetails: z.string().optional(),
    });
  • index.ts:154-169 (registration)
    Tool object definition for 'mark_task_done', including name, description, and inputSchema. This is used for registration.
    const MARK_TASK_DONE_TOOL: Tool = {
      name: "mark_task_done",
      description:
        "Mark a given task as done after you've completed it. Provide 'requestId' and 'taskId', and optionally 'completedDetails'.\n\n" +
        "After marking a task as done, a progress table will be displayed showing the updated status of all tasks.\n\n" +
        "After this, DO NOT proceed to 'get_next_task' again until the user has explicitly approved this completed task using 'approve_task_completion'.",
      inputSchema: {
        type: "object",
        properties: {
          requestId: { type: "string" },
          taskId: { type: "string" },
          completedDetails: { type: "string" },
        },
        required: ["requestId", "taskId"],
      },
    };
  • index.ts:687-687 (registration)
    Inclusion of MARK_TASK_DONE_TOOL in the list of tools returned by listTools handler.
    MARK_TASK_DONE_TOOL,
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 triggers a progress table display, updates task status, and imposes a workflow constraint (waiting for approval). However, it lacks details on error handling, permissions, or side effects beyond the progress display, leaving some gaps in transparency.

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 stated first. Each sentence adds value: the first explains the action and parameters, the second describes the immediate outcome, and the third provides critical workflow guidance. There is minimal redundancy, though the structure could be slightly more streamlined.

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 complexity (a mutation tool with workflow dependencies), no annotations, and no output schema, the description does well by covering purpose, usage, and behavioral outcomes like the progress table and approval requirement. However, it misses details on error cases, return values, or what happens if parameters are invalid, leaving room for improvement in completeness.

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?

Schema description coverage is 0%, so the description must compensate. It adds meaningful semantics: 'requestId' and 'taskId' are required to identify the task, and 'completedDetails' is optional for providing additional information. This clarifies parameter roles beyond the basic schema, though it doesn't specify formats or constraints (e.g., what 'completedDetails' should contain).

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'), identifies the resource ('task'), and distinguishes it from siblings like 'update_task' or 'delete_task' by focusing on completion status. It explicitly mentions providing parameters like 'requestId' and 'taskId', which reinforces 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 for workflow sequencing.

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