Skip to main content
Glama
jakedx6

Helios-9 MCP Server

by jakedx6

get_task

Retrieve detailed information about a specific task by its unique ID to view status, metadata, and related project hierarchy.

Instructions

Get a task by ID with full details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe unique identifier of the task

Implementation Reference

  • The primary handler function for the 'get_task' tool. It validates input using GetTaskSchema, fetches the task via supabaseService.getTask(task_id), logs the operation, handles errors (especially not found), and returns the task details.
    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
      }
    })
  • 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()
    })
  • Export of taskHandlers object that maps 'get_task' to the getTask handler function, which gets imported and spread into the main allHandlers in index.ts.
    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 registration in HeliosMCPServer constructor where taskHandlers (including get_task) are spread into allHandlers, making the tool available for MCP calls.
    this.allHandlers = {
      ...projectHandlers,
      ...taskHandlers,
      ...documentHandlers,
      ...conversationHandlers,
      ...contextAggregationHandlers,
      ...workflowAutomationHandlers,
      ...intelligentSearchHandlers,
      ...analyticsInsightsHandlers,
      ...initiativeHandlers,
      ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}),
      ...debugHandlers,
    }
  • The underlying API client method supabaseService.getTask used 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
    }

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