Skip to main content
Glama
jakedx6
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 project workflows.

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

  • The primary handler function for the 'get_task_dependencies' MCP tool. It validates input, fetches dependencies from the service, builds a dependency graph, computes critical path analysis for projects, and returns comprehensive dependency information including blocked tasks 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) } })
  • Zod schema used for input validation in the handler, ensuring either task_id or project_id is provided.
    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" })
  • MCPTool object definition that registers the tool with name, description, and JSON input schema for MCP protocol.
    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' } } } }
  • Maps tool names to their handler functions. This object is imported and spread into the main allHandlers registry in src/index.ts for MCP tool execution.
    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 }
  • Service method called by the handler to fetch raw dependencies from the backend (currently a placeholder implementation).
    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