Skip to main content
Glama
cristip73

MCP Server for Asana

by cristip73

asana_get_teams_for_user

Retrieve teams accessible to a specific Asana user. Specify a user GID or use 'me' for current user to view team memberships and permissions.

Instructions

Get teams to which the user has access

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_gidYesThe user GID to get teams for. Use 'me' to get teams for the current user.
opt_fieldsNoComma-separated list of optional fields to include

Implementation Reference

  • Executes the tool logic by calling AsanaClientWrapper.getTeamsForUser with user_gid and options, returning JSON stringified response.
    case "asana_get_teams_for_user": {
      const { user_gid, ...opts } = args;
      const response = await asanaClient.getTeamsForUser(user_gid, opts);
      return {
        content: [{ type: "text", text: JSON.stringify(response) }],
      };
    }
  • Defines the tool's name, description, and input schema requiring user_gid and optionally opt_fields.
    export const getTeamsForUserTool: Tool = {
      name: "asana_get_teams_for_user",
      description: "Get teams to which the user has access",
      inputSchema: {
        type: "object",
        properties: {
          user_gid: {
            type: "string",
            description: "The user GID to get teams for. Use 'me' to get teams for the current user."
          },
          opt_fields: {
            type: "string",
            description: "Comma-separated list of optional fields to include"
          }
        },
        required: ["user_gid"]
      }
    };
  • Imports the getTeamsForUserTool for registration in the MCP tools list.
    getTeamsForUserTool,
    getTeamsForWorkspaceTool,
    getUsersForWorkspaceTool
  • Registers getTeamsForUserTool in the exported tools array.
    getTeamsForUserTool,
  • Supporting method in AsanaClientWrapper that wraps the Asana SDK TeamsApi.getTeamsForUser call.
    async getTeamsForUser(user_gid: string, opts: any = {}) {
      try {
        const response = await this.teams.getTeamsForUser(user_gid, opts);
        return response.data;
      } catch (error) {
        console.error(`Error in getTeamsForUser: ${error}`);
        throw error;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without behavioral details. It doesn't disclose whether this is a read-only operation, pagination behavior, rate limits, authentication needs, or error handling, which are critical for a tool accessing user data.

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, clear sentence with zero wasted words. It's front-loaded with the core purpose, making it easy for an agent to parse quickly without unnecessary elaboration.

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 tool with no annotations and no output schema, the description is insufficient. It lacks details on return format, error conditions, or behavioral traits needed for safe invocation, especially given the complexity of accessing user-specific team data in Asana.

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 parameters are fully documented in the schema. The description adds no additional meaning beyond implying user context, meeting the baseline of 3 where the schema handles parameter documentation adequately.

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 verb ('Get') and resource ('teams'), specifying the scope ('to which the user has access'). It distinguishes from siblings like 'asana_get_teams_for_workspace' by focusing on user-specific access, but doesn't explicitly contrast with other team-related tools, keeping it at 4 rather than 5.

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 is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, exclusions, or compare with sibling tools like 'asana_get_teams_for_workspace', leaving the agent to infer usage context independently.

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