get_task
Retrieve detailed information about a specific task using its unique identifier to access project management data within the Helios-9 system.
Instructions
Get a task by ID with full details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The unique identifier of the task |
Implementation Reference
- src/tools/tasks.ts:446-478 (handler)The primary handler function for the 'get_task' tool. It validates input using GetTaskSchema, fetches the task details from the Supabase service, logs the operation, handles specific errors like not found, and returns the task object with a success message.export const getTask = requireAuth(async (args: any) => { const { task_id } = GetTaskSchema.parse(args) logger.info('Getting task', { task_id }) try { // Use the direct getTask method instead of searching const task = await supabaseService.getTask(task_id) logger.info('Task retrieved successfully', { task_id, title: task.title }) return { task, message: `Task "${task.title}" retrieved successfully` } } catch (error: any) { logger.error('Failed to get task', { task_id, error: error.message, errorCode: error.code, statusCode: error.statusCode, fullError: error }) // Handle NotFoundError specifically if (error.code === 'NOT_FOUND' || error.statusCode === 404) { throw new Error(`Task with ID ${task_id} not found`) } // Re-throw other errors throw error } })
- src/tools/tasks.ts:22-24 (schema)Zod schema for validating the input parameters of the get_task tool, requiring a UUID task_id.const GetTaskSchema = z.object({ task_id: z.string().uuid() })
- src/tools/tasks.ts:430-444 (registration)MCPTool definition for 'get_task' including name, description, and JSON schema for tool listing and validation.export const getTaskTool: MCPTool = { name: 'get_task', description: 'Get a task by ID with full details', inputSchema: { type: 'object', properties: { task_id: { type: 'string', format: 'uuid', description: 'The unique identifier of the task' } }, required: ['task_id'] } }
- src/tools/tasks.ts:1157-1167 (registration)Local registration of the get_task handler in the taskHandlers object, which is imported and merged into the global 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)Global registration where taskHandlers (including get_task) are merged into the server's allHandlers object, making the tool available for execution.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:422-425 (helper)API client helper method supabaseService.getTask() called by the handler to fetch task data from the backend API.async getTask(taskId: string): Promise<Task> { const response = await this.request<{ task: Task }>(`/api/mcp/tasks/${taskId}`) return response.task }