update_task
Modify existing task details including title, description, status, priority, due date, assignee, or initiative association in Helios-9 project management system.
Instructions
Update an existing task with new information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The unique identifier of the task to update | |
| title | No | New title for the task | |
| description | No | New description for the task | |
| status | No | New status for the task | |
| priority | No | New priority for the task | |
| due_date | No | New due date for the task (ISO 8601 format) | |
| assignee_id | No | New assignee for the task | |
| initiative_id | No | New initiative ID to associate the task with |
Implementation Reference
- src/tools/tasks.ts:255-271 (handler)The main handler function for the 'update_task' MCP tool. Validates input with UpdateTaskSchema, logs the update, calls supabaseService.updateTask to perform the update, logs success, and returns the updated task with a message.export const updateTask = requireAuth(async (args: any) => { const { task_id, ...updates } = UpdateTaskSchema.parse(args) logger.info('Updating task', { task_id, updates }) // Handle status change logic // completed_at property removed as it doesn't exist in the database schema const task = await supabaseService.updateTask(task_id, updates) logger.info('Task updated successfully', { task_id: task.id }) return { task, message: `Task "${task.title}" updated successfully` } })
- src/tools/tasks.ts:37-47 (schema)Zod schema for input validation used in the updateTask handler, defining optional fields for task updates.const UpdateTaskSchema = z.object({ task_id: z.string().uuid(), title: z.string().min(1).max(500).optional(), description: z.string().optional(), status: z.enum(['todo', 'in_progress', 'done']).optional(), priority: z.enum(['low', 'medium', 'high']).optional(), due_date: z.string().datetime().optional(), assignee_id: z.string().uuid().optional(), initiative_id: z.string().uuid().optional() // Removed metadata as it doesn't exist in the database schema })
- src/tools/tasks.ts:203-253 (registration)MCPTool registration object defining the 'update_task' tool, including its name, description, and JSON Schema for input validation.export const updateTaskTool: MCPTool = { name: 'update_task', description: 'Update an existing task with new information', inputSchema: { type: 'object', properties: { task_id: { type: 'string', format: 'uuid', description: 'The unique identifier of the task to update' }, title: { type: 'string', minLength: 1, maxLength: 500, description: 'New title for the task' }, description: { type: 'string', description: 'New description for the task' }, status: { type: 'string', enum: ['todo', 'in_progress', 'done'], description: 'New status for the task' }, priority: { type: 'string', enum: ['low', 'medium', 'high'], description: 'New priority for the task' }, due_date: { type: 'string', format: 'date-time', description: 'New due date for the task (ISO 8601 format)' }, assignee_id: { type: 'string', format: 'uuid', description: 'New assignee for the task' }, initiative_id: { type: 'string', format: 'uuid', description: 'New initiative ID to associate the task with' }, // Removed metadata as it doesn't exist in the database schema }, required: ['task_id'] } }
- src/tools/tasks.ts:1157-1167 (registration)Export of taskHandlers object that maps tool names to their handler functions, registering 'update_task' to the updateTask function.export const taskHandlers = { list_tasks: listTasks, create_task: createTask, get_task: getTask, update_task: updateTask, add_task_dependency: addTaskDependency, get_task_dependencies: getTaskDependencies, create_task_workflow: createTaskWorkflow, bulk_update_tasks: bulkUpdateTasks, get_task_workflow_status: getTaskWorkflowStatus }
- src/lib/api-client.ts:436-443 (helper)Helper function in the API client (supabaseService) that makes the HTTP PATCH request to the backend API endpoint to update the task.async updateTask(taskId: string, updates: Partial<Task>): Promise<Task> { const response = await this.request<{ task: Task }>(`/api/mcp/tasks/${taskId}`, { method: 'PATCH', body: JSON.stringify(updates), }) return response.task }