create_task
Add new tasks to projects in Helios-9 MCP Server by specifying title, priority, due dates, and assigning team members for organized project management.
Instructions
Create a new task in a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The project ID where the task will be created | |
| initiative_id | No | Optional initiative ID to associate the task with | |
| title | Yes | The title of the task | |
| description | No | Optional detailed description of the task | |
| priority | No | Priority level of the task | medium |
| due_date | No | Optional due date for the task (ISO 8601 format) | |
| assignee_id | No | Optional user ID to assign the task to |
Implementation Reference
- src/tools/tasks.ts:171-198 (handler)Main execution handler for create_task tool. Parses arguments with Zod schema, creates task via supabaseService, returns created task.export const createTask = requireAuth(async (args: any) => { const taskData = CreateTaskSchema.parse(args) logger.info('Creating new task', { project_id: taskData.project_id, initiative_id: taskData.initiative_id, title: taskData.title }) const task = await supabaseService.createTask({ project_id: taskData.project_id, initiative_id: taskData.initiative_id || null, title: taskData.title, description: taskData.description || null, priority: taskData.priority, due_date: taskData.due_date || null, assignee_id: taskData.assignee_id || null, status: 'todo' // Removed metadata as it doesn't exist in the database schema }) logger.info('Task created successfully', { task_id: task.id, title: task.title }) return { task, message: `Task "${task.title}" created successfully` } })
- src/tools/tasks.ts:26-35 (schema)Zod input validation schema used in the handler for create_task.const CreateTaskSchema = z.object({ project_id: z.string().uuid(), initiative_id: z.string().uuid().optional(), title: z.string().min(1).max(500), description: z.string().optional(), priority: z.enum(['low', 'medium', 'high']).default('medium'), due_date: z.string().datetime().optional(), assignee_id: z.string().uuid().optional() // Removed metadata as it doesn't exist in the database schema })
- src/tools/tasks.ts:123-169 (registration)MCPTool registration object defining name, description, and JSON inputSchema for create_task.export const createTaskTool: MCPTool = { name: 'create_task', description: 'Create a new task in a project', inputSchema: { type: 'object', properties: { project_id: { type: 'string', format: 'uuid', description: 'The project ID where the task will be created' }, initiative_id: { type: 'string', format: 'uuid', description: 'Optional initiative ID to associate the task with' }, title: { type: 'string', minLength: 1, maxLength: 500, description: 'The title of the task' }, description: { type: 'string', description: 'Optional detailed description of the task' }, priority: { type: 'string', enum: ['low', 'medium', 'high'], default: 'medium', description: 'Priority level of the task' }, due_date: { type: 'string', format: 'date-time', description: 'Optional due date for the task (ISO 8601 format)' }, assignee_id: { type: 'string', format: 'uuid', description: 'Optional user ID to assign the task to' }, // Removed metadata as it doesn't exist in the database schema }, required: ['project_id', 'title'] } }
- src/tools/tasks.ts:1157-1166 (registration)Handler map exporting create_task to createTask function, used in central allHandlers.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/index.ts:143-155 (registration)Central MCP server registration: spreads taskHandlers into allHandlers and taskTools into allTools for tool listing and calling.this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }
- src/lib/api-client.ts:427-434 (helper)Low-level helper: supabaseService.createTask API wrapper that POSTs to /api/mcp/tasks.async createTask(taskData: TaskInsert): Promise<Task> { const response = await this.request<{ task: Task }>('/api/mcp/tasks', { method: 'POST', body: JSON.stringify(taskData), }) return response.task }