Skip to main content
Glama
jakedx6
by jakedx6

update_task

Modify an existing task's details like title, status, priority, due date, or assignee to keep project information current and accurate.

Instructions

Update an existing task with new information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe unique identifier of the task to update
titleNoNew title for the task
descriptionNoNew description for the task
statusNoNew status for the task
priorityNoNew priority for the task
due_dateNoNew due date for the task (ISO 8601 format)
assignee_idNoNew assignee for the task
initiative_idNoNew initiative ID to associate the task with

Implementation Reference

  • Core execution logic for the 'update_task' tool: validates args with schema, logs action, delegates to supabaseService.updateTask, returns updated task.
    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` } })
  • Zod input validation schema for update_task tool.
    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 })
  • MCPTool registration defining name 'update_task', description, and input schema for the tool.
    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'] } }
  • Registration of task handlers in taskHandlers object, mapping '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
  • supabaseService.updateTask helper method called by the tool handler; makes PATCH request to backend API to update 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 }

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/jakedx6/helios9-MCP-Server'

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