Skip to main content
Glama
jakedx6
by jakedx6

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
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 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 } })
  • 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() })
  • 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'] } }
  • 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, }
  • 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 }

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