move-task
Move a task to a new status (todo, inProgress, done) within the Kanban MCP Server to update and manage task progress effectively.
Instructions
move a task to a different status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_status | Yes | ||
| task_id | Yes |
Implementation Reference
- src/index.ts:76-111 (registration)Registration of the 'move-task' MCP tool, including description, Zod input schema, execution hints, and inline handler function that delegates to mongooseUtils.moveTask.server.tool( "move-task", "move a task to a different status", { task_id: z.string(), new_status: z.enum(["todo", "inProgress", "done"]), }, { title: "move a task to a different status", readonlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true, }, async (params) => { try { await mongooseUtils.moveTask(params.task_id, params.new_status); return { content: [ { type: "text", text: `Task "${params.task_id}" moved to "${params.new_status}" successfully!`, }, ], }; } catch { return { content: [ { type: "text", text: `Failed to move task "${params.task_id}" to "${params.new_status}".`, }, ], }; } }
- src/index.ts:79-82 (schema)Zod schema for 'move-task' tool inputs: task_id (string), new_status (enum).{ task_id: z.string(), new_status: z.enum(["todo", "inProgress", "done"]), },
- src/utils/mongoose.ts:74-89 (handler)Handler function implementing the task move logic: finds task by ID, updates taskStatus, and saves to MongoDB.export async function moveTask( taskId: string, newStatus: "todo" | "inProgress" | "done" ) { try { const task = await Task.findById(taskId); if (!task) { throw new Error("Task not found"); } task.taskStatus = newStatus; await task.save(); } catch { throw new Error("Failed to move task"); } }