Skip to main content
Glama

asana_add_task_dependencies

Set task dependencies in Asana by linking tasks that must be completed before others can start, ensuring proper workflow sequencing.

Instructions

Set dependencies for a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID to add dependencies to
dependenciesYesArray of task IDs that this task depends on

Implementation Reference

  • The tool handler case that destructures arguments and calls the Asana client wrapper to add task dependencies.
    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) }],
      };
    }
  • Core implementation that constructs the API request body and calls the Asana SDK to add dependencies to the specified task.
    async addTaskDependencies(taskId: string, dependencies: string[]) {
      const body = {
        data: {
          dependencies: dependencies
        }
      };
      const response = await this.tasks.addDependenciesForTask(body, taskId);
      return response.data;
    }
  • Tool definition including name, description, and input schema for validating arguments.
    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"]
      }
    };
  • Imports the tool schema for registration.
    addTaskDependenciesTool,
    addTaskDependentsTool,
    setParentForTaskTool
  • Adds the tool to the list of available tools.
    addTaskDependenciesTool,

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