Skip to main content
Glama
aafsar

Task Manager MCP Server

by aafsar

update_task

Modify existing tasks in the Task Manager MCP Server by updating titles, descriptions, priorities, categories, due dates, or statuses to keep task information current and accurate.

Instructions

Update an existing task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID (use first 8 characters)
titleNoNew title
descriptionNoNew description
priorityNoNew priority
categoryNoNew category
dueDateNoNew due date (YYYY-MM-DD)
statusNoNew status

Implementation Reference

  • Executes the update_task tool: validates args with UpdateTaskSchema, loads tasks, finds task by partial ID, updates fields, saves, returns formatted response.
    export async function updateTask(args: unknown) {
      // Validate input
      const validated = UpdateTaskSchema.parse(args);
    
      // Load tasks
      const storage = await loadTasks();
    
      // Find task by ID (partial match)
      const taskIndex = storage.tasks.findIndex((t) =>
        t.id.startsWith(validated.taskId)
      );
    
      if (taskIndex === -1) {
        return {
          content: [
            {
              type: "text",
              text: `❌ Task with ID ${validated.taskId} not found.`,
            },
          ],
        };
      }
    
      const task = storage.tasks[taskIndex]!;
    
      // Update fields if provided
      if (validated.title !== undefined) {
        task.title = validated.title;
      }
      if (validated.description !== undefined) {
        task.description = validated.description;
      }
      if (validated.priority !== undefined) {
        task.priority = validated.priority as Priority;
      }
      if (validated.category !== undefined) {
        task.category = validated.category;
      }
      if (validated.dueDate !== undefined) {
        task.dueDate = validated.dueDate;
      }
      if (validated.status !== undefined) {
        task.status = validated.status as Status;
        if (validated.status === "completed" && !task.completedAt) {
          task.completedAt = new Date().toISOString();
        } else if (validated.status !== "completed") {
          task.completedAt = undefined;
        }
      }
    
      await saveTasks(storage);
    
      return {
        content: [
          {
            type: "text",
            text: `✅ Task updated successfully!\n\n${formatTask(task)}`,
          },
        ],
      };
    }
  • Zod schema defining the input validation for update_task tool arguments.
    export const UpdateTaskSchema = z.object({
      taskId: z.string().min(8, "Task ID must be at least 8 characters"),
      title: z.string().optional(),
      description: z.string().optional(),
      priority: z.enum(["low", "medium", "high"]).optional(),
      category: z.string().optional(),
      dueDate: z
        .string()
        .regex(/^\d{4}-\d{2}-\d{2}$/, "Date must be YYYY-MM-DD")
        .optional(),
      status: z.enum(["pending", "in_progress", "completed"]).optional(),
    });
  • src/index.ts:84-125 (registration)
    Registers the update_task tool in the TOOLS array with name, description, and JSON inputSchema for MCP ListToolsRequest.
    {
      name: "update_task",
      description: "Update an existing task",
      inputSchema: {
        type: "object",
        properties: {
          taskId: {
            type: "string",
            description: "Task ID (use first 8 characters)",
            minLength: 8,
          },
          title: {
            type: "string",
            description: "New title",
          },
          description: {
            type: "string",
            description: "New description",
          },
          priority: {
            type: "string",
            enum: ["low", "medium", "high"],
            description: "New priority",
          },
          category: {
            type: "string",
            description: "New category",
          },
          dueDate: {
            type: "string",
            pattern: "^\\d{4}-\\d{2}-\\d{2}$",
            description: "New due date (YYYY-MM-DD)",
          },
          status: {
            type: "string",
            enum: ["pending", "in_progress", "completed"],
            description: "New status",
          },
        },
        required: ["taskId"],
      },
    },
  • src/index.ts:221-222 (registration)
    Dispatches calls to the updateTask handler function in the MCP CallToolRequest switch statement.
    case "update_task":
      return await updateTask(args);
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits like whether updates are partial or full, if it requires specific permissions, what happens to unspecified fields, error conditions, or response format. 'Update' implies mutation, but no safety or operational details are given.

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 a single, efficient sentence with no wasted words. It's front-loaded with the core action, though it could be more informative. The brevity is appropriate but borders on under-specification given the tool's complexity.

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 7 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns, error handling, or behavioral nuances. The schema covers parameters, but the description fails to provide necessary context for safe and effective use.

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 100%, so the schema fully documents all 7 parameters. The description adds no additional meaning beyond implying these are fields that can be updated. Baseline 3 is appropriate since the schema handles parameter documentation, though the description doesn't compensate with context like update constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update an existing task' clearly states the action (update) and resource (task), but it's vague about scope and doesn't distinguish from siblings like 'complete_task' or 'delete_task'. It specifies 'existing' which helps differentiate from 'create_task', but lacks detail about what aspects can be updated.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'complete_task' (which might update status) or 'delete_task'. The description implies it's for general updates, but doesn't specify prerequisites, constraints, or typical use cases relative to sibling tools.

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/aafsar/task-manager-mcp-server'

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