Skip to main content
Glama

update_task

Modify the title or description of uncompleted tasks in the MCP TaskManager system. Input task ID and new details to display updated progress.

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
descriptionNo
requestIdYes
taskIdYes
titleNo

Implementation Reference

  • The primary handler function for the update_task tool. It locates the specified request and task, validates that the task is not done or approved, applies the provided title and/or description updates, persists the changes, and returns a success 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 input schema for the update_task tool, defining required requestId and taskId, with optional title and description fields.
    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 in the listTools() method, specifying the name, description, and input schema for update_task.
    { name: "update_task", description: "Update an existing task.", inputSchema: UpdateTaskSchema, },
  • Dispatch handler in the callTool method that parses input parameters using the schema and delegates to the updateTask method.
    case "update_task": { const parsed = UpdateTaskSchema.safeParse(parameters); if (!parsed.success) { throw new Error(`Invalid parameters: ${parsed.error}`); } return this.updateTask(parsed.data.requestId, parsed.data.taskId, { title: parsed.data.title, description: parsed.data.description, }); }

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/Rudra-ravi/mcp-taskmanager'

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