Skip to main content
Glama

update_task

Modify the title or description of an existing, uncompleted task in TaskFlow MCP and view the updated progress table.

Instructions

Update an existing task's title and/or description. Only uncompleted tasks can be updated.

A progress table will be displayed showing the updated task information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
taskIdYes
titleNo
descriptionNo

Implementation Reference

  • MCP tool handler function that extracts arguments and delegates to TaskFlowService.updateTask method to perform the update.
    async update_task(args: any) {
      const { requestId, taskId, title, description } = args ?? {};
      return service.updateTask(String(requestId), String(taskId), { title, description });
    },
  • Tool definition including name, description, and input schema for the update_task tool.
    export const UPDATE_TASK_TOOL: Tool = {
      name: "update_task",
      description:
        "Update an existing task's title and/or description. Only uncompleted tasks can be updated.\n\n" +
        "A progress table will be displayed showing the updated task information.",
      inputSchema: {
        type: "object",
        properties: {
          requestId: { type: "string" },
          taskId: { type: "string" },
          title: { type: "string" },
          description: { type: "string" },
        },
        required: ["requestId", "taskId"],
      },
    };
  • Registration of UPDATE_TASK_TOOL in the list of tools provided by the MCP server.
    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 task update logic: loads data, validates, sanitizes and applies updates, saves, and returns status with progress table.
    public async updateTask(
      requestId: string,
      taskId: string,
      updates: { title?: string; description?: 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: "error", message: "Cannot update completed task" };
    
      if (updates.title) task.title = sanitizeString(updates.title);
      if (updates.description) task.description = sanitizeString(updates.description);
    
      await this.saveTasks();
    
      const progressTable = formatTaskProgressTableForRequest(req);
      return {
        status: "task_updated",
        message: `Task ${taskId} has been updated.\n${progressTable}`,
        task: { id: task.id, title: task.title, description: task.description },
      };
    }
  • JSON schema definition for update_task input validation in jsonSchemas object (matches tool inputSchema).
    update_task: {
      type: "object",
      properties: {
        requestId: { type: "string" },
        taskId: { type: "string" },
        title: { type: "string" },
        description: { type: "string" },
      },
      required: ["requestId", "taskId"],
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions that a 'progress table will be displayed' as output, which adds some behavioral context beyond the basic update action. However, it doesn't address important aspects like whether this is a destructive operation, what happens to unchanged fields, error conditions, or authentication requirements.

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 concise with two clear sentences. The first sentence states the core functionality and constraint, while the second describes the output behavior. No wasted words, though it could be slightly more structured with bullet points for constraints.

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?

For a mutation tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is insufficient. While it provides basic purpose and one constraint, it lacks information about parameter meanings, error handling, return values beyond the progress table mention, and comparison to sibling update tools.

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?

With 0% schema description coverage and 4 parameters, the description provides minimal parameter information. It mentions 'title and/or description' as updatable fields, which maps to two of the four parameters. However, it doesn't explain 'requestId' or 'taskId' parameters at all, leaving half the parameters undocumented in both schema and description.

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 ('Update') and resource ('existing task's title and/or description'), making the purpose understandable. It doesn't explicitly differentiate from sibling tools like 'update_note' or 'update_subtask', but the focus on tasks provides some implicit distinction.

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 provides one explicit usage guideline: 'Only uncompleted tasks can be updated.' This gives important context about when NOT to use the tool. However, it doesn't mention alternatives (like 'mark_task_done' for completion) or other contextual factors like permissions or prerequisites.

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