Skip to main content
Glama
jakedx6

Helios-9 MCP Server

by jakedx6

add_task_dependency

Establish task dependencies to define workflow relationships and sequence project activities within the Helios-9 project management system.

Instructions

Add a dependency relationship between tasks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesID of the dependent task
depends_on_task_idYesID of the task this task depends on
dependency_typeNoType of dependency relationshipblocks

Implementation Reference

  • The main execution handler for the 'add_task_dependency' tool. It validates input, checks task existence and circular dependencies, creates the dependency in the database, and returns the created dependency with related task information.
    export const addTaskDependency = requireAuth(async (args: any) => {
      const { task_id, depends_on_task_id, dependency_type } = AddTaskDependencySchema.parse(args)
      
      logger.info('Adding task dependency', { task_id, depends_on_task_id, dependency_type })
    
      // Validate tasks exist
      const [task, dependsOnTask] = await Promise.all([
        supabaseService.getTask(task_id),
        supabaseService.getTask(depends_on_task_id)
      ])
    
      if (!task || !dependsOnTask) {
        throw new Error('One or both tasks not found')
      }
    
      // Check for circular dependencies
      const hasCircularDependency = await checkCircularDependency(task_id, depends_on_task_id)
      if (hasCircularDependency) {
        throw new Error('Cannot create dependency: would create circular dependency')
      }
    
      // Create dependency record
      const dependency = await supabaseService.createTaskDependency({
        task_id,
        depends_on_task_id,
        dependency_type,
        created_at: new Date().toISOString()
      })
    
      // Note: blocked status doesn't exist in database schema
      // In a real implementation, you might use metadata or a separate blocking system
    
      return {
        dependency,
        task: await supabaseService.getTask(task_id),
        depends_on_task: dependsOnTask,
        message: `Dependency created: "${task.title}" ${dependency_type} "${dependsOnTask.title}"`
      }
    })
  • Zod schema for validating input parameters to the add_task_dependency tool: task_id, depends_on_task_id, and optional dependency_type.
    const AddTaskDependencySchema = z.object({
      task_id: z.string().min(1),
      depends_on_task_id: z.string().min(1),
      dependency_type: z.enum(['blocks', 'subtask', 'related']).default('blocks')
    })
  • MCPTool registration object for 'add_task_dependency', including name, description, and input schema definition.
    export const addTaskDependencyTool: MCPTool = {
      name: 'add_task_dependency',
      description: 'Add a dependency relationship between tasks',
      inputSchema: {
        type: 'object',
        properties: {
          task_id: {
            type: 'string',
            description: 'ID of the dependent task'
          },
          depends_on_task_id: {
            type: 'string',
            description: 'ID of the task this task depends on'
          },
          dependency_type: {
            type: 'string',
            enum: ['blocks', 'subtask', 'related'],
            default: 'blocks',
            description: 'Type of dependency relationship'
          }
        },
        required: ['task_id', 'depends_on_task_id']
      }
    }
  • Registration of the addTaskDependency handler function under the 'add_task_dependency' key in the taskHandlers export object, used for tool 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
    }
  • Inclusion of addTaskDependencyTool in the taskTools export object for module-level tool registry.
    export const taskTools = {
      listTasksTool,
      createTaskTool,
      getTaskTool,
      updateTaskTool,
      addTaskDependencyTool,
      getTaskDependenciesTool,
      createTaskWorkflowTool,
      bulkUpdateTasksTool,
      getTaskWorkflowStatusTool
    }

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