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;

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It explains the direction of dependencies but uses 'Set' which could imply replacing all dependents rather than adding to existing ones (the tool name says 'add'). No side effects, mutability, or return behavior are disclosed, which is a significant gap for a mutation tool.

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, front-loaded sentence with no filler. Every word contributes to explaining the operation, making it highly concise and well-structured for quick parsing.

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?

Given the tool has no annotations and no output schema, the description should provide more context about behavior, such as whether it appends or replaces dependents, and what the successful response looks like. The description only covers the bare purpose, leaving critical usage details unaddressed.

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%, and the schema already explains both parameters clearly. The description's parenthetical 'tasks that depend on this task' is redundant with the schema's own wording, so it adds no additional semantic value beyond what the schema provides.

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

Purpose5/5

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

The description uses a specific verb ('Set') and resource ('dependents for a task'), with a parenthetical clarifying that the dependents are tasks that depend on this task. This direction disambiguates it from the sibling 'asana_add_task_dependencies', which sets the opposite dependency direction.

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 explicit guidance is given on when to use this tool versus alternatives like asana_add_task_dependencies. The description implies a use case but does not state prerequisites, exclusions, or relational context, leaving the agent to infer when this is the appropriate choice.

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