Skip to main content
Glama
cristip73

MCP Server for Asana

by cristip73

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

  • Tool handler case that destructures the input arguments (task_id, dependencies) and calls the AsanaClientWrapper.addTaskDependencies method, returning the JSON stringified response.
    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 MCP Tool object with name, description, and inputSchema specifying required task_id (string) and dependencies (array of strings).
    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 addTaskDependenciesTool in the exported tools array used by the MCP server.
    addTagsToTaskTool,
    addTaskDependenciesTool,
    addTaskDependentsTool,
    setParentForTaskTool,
    addFollowersToTaskTool,
  • AsanaClientWrapper helper method that normalizes the dependencies to an array and makes the API call to Asana's TasksApi.addDependenciesForTask.
    async addTaskDependencies(taskId: string, dependencies: any) {
      // Ensure dependencies is an array
      const dependenciesArray = this.ensureArray(dependencies);
      
      const body = {
        data: {
          dependencies: dependenciesArray
        }
      };
      const response = await this.tasks.addDependenciesForTask(body, taskId);
      return response.data;
    }
  • Validation logic specific to this tool: validates task_id as a valid GID and ensures dependencies parameter is present.
    case 'asana_add_task_dependencies':
    case 'asana_add_task_dependents':
      result = validateGid(params.task_id, 'task_id');
      if (!result.valid) errors.push(...result.errors);
      
      // Verificăm dacă dependencies/dependents există și este un array sau string
      const arrayParam = toolName === 'asana_add_task_dependencies' ? 'dependencies' : 'dependents';
      if (!params[arrayParam]) {
        errors.push(`${arrayParam} is required`);
      }
      break;
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Set dependencies' implies a mutation operation, but the description doesn't specify whether this overwrites existing dependencies or appends to them, what permissions are required, whether it's idempotent, or what happens on failure. This leaves significant gaps for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, how errors are handled, or important behavioral details like whether dependencies are replaced or appended. Given the complexity of modifying task relationships, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('task_id' and 'dependencies') clearly documented in the schema. The description adds no additional parameter information beyond what's already in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Set dependencies for a task' clearly states the verb ('Set') and resource ('dependencies for a task'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from the sibling tool 'asana_add_task_dependents', which appears to be a related but distinct operation (dependencies vs. dependents).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (e.g., task must exist), when not to use it, or how it relates to similar tools like 'asana_add_task_dependents' or 'asana_update_task' which might also affect task relationships.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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