Skip to main content
Glama

update_task

Modify existing tasks by updating their title, description, status, or priority to maintain accurate productivity tracking within the TodoPomo system.

Instructions

Update an existing task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesTask ID
titleNoNew title
descriptionNoNew description
statusNoNew status
priorityNoNew priority

Implementation Reference

  • Handler function for the 'update_task' tool. It locates the task by ID, updates specified fields (title, description, status, priority), sets completion timestamp if status is 'completed', persists changes to data file, and returns the updated task or error if not found.
    case "update_task": {
      const taskIndex = data.tasks.findIndex((t) => t.id === args.taskId);
      if (taskIndex === -1) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({ success: false, error: "Task not found" }),
            },
          ],
        };
      }
      const task = data.tasks[taskIndex];
      if (args.title) task.title = args.title as string;
      if (args.description) task.description = args.description as string;
      if (args.status) {
        task.status = args.status as "pending" | "in-progress" | "completed";
        if (args.status === "completed") {
          task.completedAt = new Date().toISOString();
        }
      }
      if (args.priority)
        task.priority = args.priority as "low" | "medium" | "high";
      saveData(data);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              { success: true, task, message: "Task updated successfully" },
              null,
              2
            ),
          },
        ],
      };
    }
  • Input schema definition for the 'update_task' tool, including name, description, properties (taskId required, others optional), enums for status and priority.
    {
      name: "update_task",
      description: "Update an existing task",
      inputSchema: {
        type: "object",
        properties: {
          taskId: { type: "string", description: "Task ID" },
          title: { type: "string", description: "New title" },
          description: { type: "string", description: "New description" },
          status: {
            type: "string",
            enum: ["pending", "in-progress", "completed"],
            description: "New status",
          },
          priority: {
            type: "string",
            enum: ["low", "medium", "high"],
            description: "New priority",
          },
        },
        required: ["taskId"],
      },
    },
  • src/index.ts:245-247 (registration)
    Registration of the ListTools handler that exposes all tools including 'update_task' via the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
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. 'Update an existing task' implies a mutation operation but doesn't specify permissions needed, whether changes are reversible, error handling, or rate limits. This is a significant gap for a mutation tool with zero annotation coverage.

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, making it appropriately concise. However, it's under-specified rather than optimally structured, as it could benefit from front-loading more critical information without sacrificing brevity.

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 the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what happens on success or failure, what fields are optional versus required beyond taskId, or how it interacts with sibling tools, leaving gaps in contextual understanding.

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?

The input schema has 100% description coverage, clearly documenting all 5 parameters including enums for status and priority. The description adds no additional meaning beyond what the schema provides, so it meets the baseline score of 3 for adequate schema support without extra value.

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 verb ('update') and resource ('task'), but it's vague about what aspects can be updated and doesn't differentiate from sibling tools like 'add_task' or 'delete_task'. It meets the basic requirement of stating what the tool does but lacks specificity.

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?

The description provides no guidance on when to use this tool versus alternatives like 'add_task' for creating new tasks or 'delete_task' for removal. There's no mention of prerequisites, context, or exclusions, leaving the agent without usage direction.

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/PratyayRajak/todopomo-mcp'

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