Skip to main content
Glama

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
NameRequiredDescriptionDefault
dependenciesYesArray of task IDs that this task depends on
task_idYesThe task ID to add dependencies to

Implementation Reference

  • 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; }
  • 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"] } };
  • 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, ];

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/roychri/mcp-server-asana'

If you have feedback or need assistance with the MCP directory API, please join our Discord server