Skip to main content
Glama
cristip73

MCP Server for Asana

by cristip73

asana_add_followers_to_task

Add team members as followers to an Asana task to keep them updated on progress and changes.

Instructions

Add followers to a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID to add followers to
followersYesArray of user IDs to add as followers to the task

Implementation Reference

  • Core implementation that adds followers to a task using Asana API with fallback method.
    async addFollowersToTask(taskId: string, followers: any) {
      // Ensure followers is an array
      const followersArray = this.ensureArray(followers);
      
      try {
        const body = {
          data: {
            followers: followersArray
          }
        };
        const response = await this.tasks.addFollowersForTask(body, taskId);
        return response.data;
      } catch (error) {
        console.error(`Error adding followers to task: ${error}`);
        // Dacă metoda standard eșuează, încercăm metoda alternativă cu callApi direct
        try {
          const client = Asana.ApiClient.instance;
          const response = await client.callApi(
            `/tasks/${taskId}/addFollowers`,
            'POST',
            { task_gid: taskId },
            {},
            {},
            {},
            { data: { followers: followersArray } },
            ['token'],
            ['application/json'],
            ['application/json'],
            'Blob'
          );
          return response.data;
        } catch (fallbackError) {
          console.error("Error in fallback method for adding followers:", fallbackError);
          throw fallbackError;
        }
      }
    }
  • Tool dispatcher switch case that handles the tool execution by calling the Asana client.
    case "asana_add_followers_to_task": {
      const { task_id, followers } = args;
      const response = await asanaClient.addFollowersToTask(task_id, followers);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Tool definition with input schema specifying task_id and followers array.
    export const addFollowersToTaskTool: Tool = {
      name: "asana_add_followers_to_task",
      description: "Add followers to a task",
      inputSchema: {
        type: "object",
        properties: {
          task_id: {
            type: "string",
            description: "The task ID to add followers to"
          },
          followers: {
            type: "array",
            items: {
              type: "string"
            },
            description: "Array of user IDs to add as followers to the task"
          }
        },
        required: ["task_id", "followers"]
      }
    };
  • Tool registration in the exported tools array.
    setParentForTaskTool,
    addFollowersToTaskTool,
  • Input parameter validation specific to this tool.
    case 'asana_add_followers_to_task':
      result = validateGid(params.task_id, 'task_id');
      if (!result.valid) errors.push(...result.errors);
      
      if (!params.followers) {
        errors.push('followers 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 full burden for behavioral disclosure. While 'Add followers' implies a mutation operation, the description doesn't disclose important behavioral aspects: whether this requires specific permissions, whether followers are added cumulatively or replace existing ones, what happens if invalid user IDs are provided, or what the expected response looks like. This is inadequate for a mutation tool with zero annotation coverage.

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 extremely concise - a single four-word phrase that communicates the core purpose without any wasted words. It's front-loaded with the essential information and has zero unnecessary content.

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 insufficiently complete. It doesn't address behavioral aspects like permission requirements, error conditions, or what constitutes a successful operation. Given the complexity of adding followers (which involves user validation and potentially permission checks), the description should provide more context about how the operation works.

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?

The input schema has 100% description coverage, with both parameters clearly documented in the schema itself. The description doesn't add any meaningful parameter semantics beyond what's already in the schema descriptions. The baseline score of 3 is appropriate when the schema does the heavy lifting of parameter documentation.

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 ('Add followers') and target resource ('to a task'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'asana_add_members_for_project' or 'asana_add_tags_to_task' which also add entities to Asana objects, leaving room for confusion about when to use this specific tool.

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. With many sibling tools that add various entities to Asana objects (followers, members, tags, dependencies, etc.), there's no indication of when this specific 'add followers to task' operation is appropriate versus other similar operations.

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