Skip to main content
Glama
jakedx6

Helios-9 MCP Server

by jakedx6

get_task_dependencies

Retrieve all dependencies for a task or project in Helios-9, including optional transitive dependencies, to understand relationships and manage workflow dependencies.

Instructions

Get all dependencies for a task or project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idNoID of the task (optional if project_id provided)
project_idNoID of the project (optional if task_id provided)
include_transitiveNoInclude transitive dependencies

Implementation Reference

  • Primary handler function that executes the tool: validates input, fetches dependencies, builds graph and analysis.
    export const getTaskDependencies = requireAuth(async (args: any) => {
      const { task_id, project_id, include_transitive } = GetTaskDependenciesSchema.parse(args)
      
      logger.info('Getting task dependencies', { task_id, project_id, include_transitive })
    
      let dependencies
      if (task_id) {
        dependencies = await supabaseService.getTaskDependencies(task_id)
      } else {
        dependencies = await supabaseService.getProjectDependencies(project_id!)
      }
    
      // Build dependency graph
      const dependencyGraph = buildDependencyGraph(dependencies)
      
      // Calculate critical path if project-level
      let criticalPath = null
      if (project_id) {
        const projectTasks = await supabaseService.getTasks({ project_id })
        criticalPath = calculateCriticalPath(projectTasks, dependencies)
      }
    
      return {
        dependencies,
        dependency_graph: dependencyGraph,
        critical_path: criticalPath,
        blocked_tasks: dependencies.filter(d => d.dependency_type === 'blocks' && d.depends_on_task?.status !== 'done'),
        analysis: analyzeDependencies(dependencies)
      }
    })
  • MCPTool object registering the tool with name, description, and input schema.
    export const getTaskDependenciesTool: MCPTool = {
      name: 'get_task_dependencies',
      description: 'Get all dependencies for a task or project',
      inputSchema: {
        type: 'object',
        properties: {
          task_id: {
            type: 'string',
            description: 'ID of the task (optional if project_id provided)'
          },
          project_id: {
            type: 'string',
            description: 'ID of the project (optional if task_id provided)'
          },
          include_transitive: {
            type: 'boolean',
            default: false,
            description: 'Include transitive dependencies'
          }
        }
      }
    }
  • Zod schema for internal input validation in the handler.
    const GetTaskDependenciesSchema = z.object({
      task_id: z.string().optional(),
      project_id: z.string().optional(),
      include_transitive: z.boolean().default(false)
    }).refine(data => data.task_id || data.project_id, {
      message: "Either task_id or project_id must be provided"
    })
  • Export object registering all task handlers, including get_task_dependencies.
    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 handler to fetch raw dependencies (currently a stub).
    async getTaskDependencies(taskId: string): Promise<any[]> {
      logger.warn('Task dependencies not yet implemented in API')
      return []

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