Skip to main content
Glama

update_task

Modify the title or description of an existing uncompleted task in the MCP TaskManager queue, then 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

  • The main handler function for the update_task tool. Finds the specified request and task, validates that the task is editable (not done or approved), applies optional title and description updates, persists changes via saveTasks, and returns a confirmation message with the updated task progress table.
    public async updateTask(
      requestId: string,
      taskId: string,
      updates: { title?: string; description?: 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");
      }
    
      if (task.done || task.approved) {
        throw new Error("Cannot update completed or approved tasks");
      }
    
      if (updates.title) {
        task.title = updates.title;
      }
      if (updates.description) {
        task.description = updates.description;
      }
    
      await this.saveTasks();
    
      return {
        message:
          "Task updated successfully.\n" + this.formatTaskProgressTable(requestId),
      };
    }
  • Zod schema defining the input validation for update_task: required requestId and taskId, optional title and description.
    const UpdateTaskSchema = z.object({
      requestId: z.string(),
      taskId: z.string(),
      title: z.string().optional(),
      description: z.string().optional(),
    });
  • index.ts:185-189 (registration)
    Tool registration entry in the listTools() method's return array, defining the tool's name, description, and input schema.
    {
      name: "update_task",
      description: "Update an existing task.",
      inputSchema: UpdateTaskSchema,
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions that a 'progress table will be displayed,' which adds some behavioral context about the output. However, it lacks details on permissions, error handling, or mutation effects, which are important for an update 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 two sentences that are front-loaded: the first states the purpose and constraint, and the second adds output behavior. There's no wasted text, though it could be slightly more structured.

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

Completeness3/5

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

Given no annotations, no output schema, and 0% schema coverage, the description is moderately complete. It covers the purpose, a key constraint, and output behavior, but lacks details on parameters, error cases, or integration with sibling tools, leaving room for improvement.

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?

Schema description coverage is 0%, so the description must compensate. It implies that 'title' and 'description' are updatable fields, which adds meaning beyond the schema. However, it doesn't explain 'requestId' or 'taskId' parameters, leaving gaps in parameter understanding.

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 'update' and resource 'existing task's title and/or description', making the purpose specific and understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'mark_task_done' or 'delete_task' beyond the update action.

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

Usage Guidelines4/5

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

The description provides clear context with 'Only uncompleted tasks can be updated,' which helps guide when to use this tool. It doesn't explicitly mention alternatives like 'delete_task' or 'mark_task_done' for completed tasks, but the constraint is useful.

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