Skip to main content
Glama
jakedx6
by jakedx6

create_task

Add a new task to a project in Helios-9 MCP Server by specifying title, priority, due date, and assignee for project management.

Instructions

Create a new task in a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe project ID where the task will be created
initiative_idNoOptional initiative ID to associate the task with
titleYesThe title of the task
descriptionNoOptional detailed description of the task
priorityNoPriority level of the taskmedium
due_dateNoOptional due date for the task (ISO 8601 format)
assignee_idNoOptional user ID to assign the task to

Implementation Reference

  • Main execution handler for 'create_task' MCP tool. Validates input with Zod schema, logs activity, calls supabaseService.createTask to persist the task, and returns the created task with a success message.
    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` } })
  • MCPTool registration object defining the 'create_task' tool with name, description, and JSON input schema for MCP protocol compliance.
    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'] } }
  • Zod validation schema used in the handler to parse and validate input arguments for creating a 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 })
  • Central handlers map registering 'create_task' handler function for use in MCP tool server dispatching.
    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 }
  • API client helper method called by the tool handler to create the task via POST to /api/mcp/tasks endpoint.
    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 }

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