Skip to main content
Glama
kazuph

@kazuph/mcp-taskmanager

by kazuph

update_task

Modify the title or description of an uncompleted task in the task manager. Displays a progress table with the updated task details after changes are applied.

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

  • Implements the core logic for updating an uncompleted task's title and/or description, persists changes, and provides a progress table.
    public async updateTask( requestId: string, taskId: string, updates: { title?: string; description?: string } ) { await this.loadTasks(); const req = this.data.requests.find((r) => r.requestId === 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 = updates.title; if (updates.description) task.description = updates.description; await this.saveTasks(); const progressTable = this.formatTaskProgressTable(requestId); return { status: "task_updated", message: `Task ${taskId} has been updated.\n${progressTable}`, task: { id: task.id, title: task.title, description: task.description, }, }; }
  • Zod schema defining the input parameters for the update_task tool.
    const UpdateTaskSchema = z.object({ requestId: z.string(), taskId: z.string(), title: z.string().optional(), description: z.string().optional(), });
  • index.ts:250-265 (registration)
    Defines the Tool object for 'update_task' including name, description, and input schema, used for registration.
    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"], }, };
  • index.ts:684-696 (registration)
    Registers UPDATE_TASK_TOOL in the list returned by ListToolsRequestHandler.
    tools: [ REQUEST_PLANNING_TOOL, GET_NEXT_TASK_TOOL, MARK_TASK_DONE_TOOL, APPROVE_TASK_COMPLETION_TOOL, APPROVE_REQUEST_COMPLETION_TOOL, OPEN_TASK_DETAILS_TOOL, LIST_REQUESTS_TOOL, ADD_TASKS_TO_REQUEST_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, ], }));
  • MCP server request handler for 'update_task': validates args with schema and delegates to TaskManagerServer.updateTask.
    case "update_task": { const parsed = UpdateTaskSchema.safeParse(args); if (!parsed.success) { throw new Error(`Invalid arguments: ${parsed.error}`); } const { requestId, taskId, title, description } = parsed.data; const result = await taskManagerServer.updateTask(requestId, taskId, { title, description, }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }

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

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