asana_add_task_dependencies
Set task dependencies in Asana to define workflow sequences and ensure proper task order completion.
Instructions
Set dependencies for a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dependencies | Yes | Array of task IDs that this task depends on | |
| task_id | Yes | The task ID to add dependencies to |
Implementation Reference
- src/asana-client-wrapper.ts:217-225 (handler)Implements the core logic for adding dependencies to an Asana task by calling the Asana SDK's addDependenciesForTask method.async addTaskDependencies(taskId: string, dependencies: string[]) { const body = { data: { dependencies: dependencies } }; const response = await this.tasks.addDependenciesForTask(body, taskId); return response.data; }
- src/tool-handler.ts:326-332 (handler)Handler case in the main tool dispatcher that extracts arguments and calls the Asana client wrapper's addTaskDependencies method.case "asana_add_task_dependencies": { const { task_id, dependencies } = args; const response = await asanaClient.addTaskDependencies(task_id, dependencies); return { content: [{ type: "text", text: JSON.stringify(response) }], }; }
- Defines the tool's metadata, description, and input schema for validation.export const addTaskDependenciesTool: Tool = { name: "asana_add_task_dependencies", description: "Set dependencies for a task", inputSchema: { type: "object", properties: { task_id: { type: "string", description: "The task ID to add dependencies to" }, dependencies: { type: "array", items: { type: "string" }, description: "Array of task IDs that this task depends on" } }, required: ["task_id", "dependencies"] } };
- src/tool-handler.ts:38-61 (registration)Registers the tool by including it in the list of available tools exported for the MCP server.const all_tools: Tool[] = [ listWorkspacesTool, searchProjectsTool, searchTasksTool, getTaskTool, createTaskTool, getStoriesForTaskTool, updateTaskTool, getProjectTool, getProjectTaskCountsTool, getProjectSectionsTool, createTaskStoryTool, addTaskDependenciesTool, addTaskDependentsTool, createSubtaskTool, getMultipleTasksByGidTool, getProjectStatusTool, getProjectStatusesForProjectTool, createProjectStatusTool, deleteProjectStatusTool, setParentForTaskTool, getTasksForTagTool, getTagsForWorkspaceTool, ];