Skip to main content
Glama
cristip73

MCP Server for Asana

by cristip73

asana_add_task_dependents

Add dependent tasks to an Asana task to establish workflow dependencies and manage task sequencing within projects.

Instructions

Set dependents for a task (tasks that depend on this task)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID to add dependents to
dependentsYesArray of task IDs that depend on this task

Implementation Reference

  • Handler case in tool_handler switch that destructures arguments and calls AsanaClientWrapper.addTaskDependents to execute the tool logic
    case "asana_add_task_dependents": {
      const { task_id, dependents } = args;
      const response = await asanaClient.addTaskDependents(task_id, dependents);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Core implementation in AsanaClientWrapper that normalizes dependents array and calls Asana TasksApi.addDependentsForTask
    async addTaskDependents(taskId: string, dependents: any) {
      // Ensure dependents is an array
      const dependentsArray = this.ensureArray(dependents);
      
      const body = {
        data: {
          dependents: dependentsArray
        }
      };
      const response = await this.tasks.addDependentsForTask(body, taskId);
      return response.data;
    }
  • Tool definition with input schema specifying task_id and dependents array
    export const addTaskDependentsTool: Tool = {
      name: "asana_add_task_dependents",
      description: "Set dependents for a task (tasks that depend on this task)",
      inputSchema: {
        type: "object",
        properties: {
          task_id: {
            type: "string",
            description: "The task ID to add dependents to"
          },
          dependents: {
            type: "array",
            items: {
              type: "string"
            },
            description: "Array of task IDs that depend on this task"
          }
        },
        required: ["task_id", "dependents"]
      }
    };
  • Registration of the tool in the exported tools array used by MCP
    addTaskDependenciesTool,
    addTaskDependentsTool,
  • Input parameter validation logic for task_id (GID) and dependents array in validateTaskParameters
    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?

No annotations are provided, so the description carries full burden. It states 'Set dependents' which implies a write/mutation operation, but doesn't disclose behavioral traits like whether this overwrites existing dependents, requires specific permissions, has rate limits, or what happens on success/failure. The description is minimal and lacks operational context.

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

Conciseness4/5

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

The description is a single, efficient sentence with a clarifying parenthetical. It's front-loaded with the core action and resource, though it could be slightly more structured by separating the clarification into a second sentence.

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 incomplete. It doesn't explain what the tool returns, error conditions, or side effects. Given the complexity of modifying task relationships and the lack of structured behavioral data, more context is needed for an agent to use this effectively.

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%, so the schema fully documents both parameters (task_id and dependents). The description adds no additional parameter semantics beyond what's in the schema, such as format examples or constraints. Baseline 3 is appropriate when 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 clearly states the action ('Set dependents') and target resource ('for a task'), with parenthetical clarification about what dependents are. It distinguishes from the sibling 'asana_add_task_dependencies' by focusing on dependents rather than dependencies, though it doesn't explicitly contrast them.

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?

No guidance on when to use this tool versus alternatives like 'asana_add_task_dependencies' or 'asana_update_task'. The description implies usage for setting task dependents but provides no context about prerequisites, constraints, or when other tools might be more appropriate.

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