Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

get_user_organizations

Retrieve the list of organizations a user belongs to within Alibaba Cloud DevOps for managing projects, repositories, and workflows.

Instructions

Get the list of organizations the current user belongs to

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The switch case handler for the 'get_user_organizations' tool. It calls the supporting function getUserOrganizationsFunc() from the organization module and returns the result formatted as MCP tool response content.
    case "get_user_organizations": {
      const userOrgs = await organization.getUserOrganizationsFunc();
      return {
        content: [{ type: "text", text: JSON.stringify(userOrgs, null, 2) }],
      };
    }
  • Zod schemas defining the structure of organization info and the array of user organizations (output validation for the tool).
    export const OrganizationInfoSchema = z.object({
      id: z.string().optional().describe("Organization ID"),
      name: z.string().optional().describe("Organization name"),
      description: z.string().optional().describe("Organization description"),
    });
    
    export const UserOrganizationsInfoSchema = z.array(OrganizationInfoSchema);
  • Tool registration entry defining name, description, and empty input schema for 'get_user_organizations' in the base tools registry.
    {
      name: "get_user_organizations",
      description: "Get the list of organizations the current user belongs to",
      inputSchema: zodToJsonSchema(z.object({})),
    },
  • The core helper function that performs the API request to fetch the user's organizations and validates the response using UserOrganizationsInfoSchema.
    export async function getUserOrganizationsFunc(
    ): Promise<z.infer<typeof UserOrganizationsInfoSchema>> {
      const url = "/oapi/v1/platform/organizations";
    
      const response = await yunxiaoRequest(url, {
        method: "GET",
      });
    
      if (!Array.isArray(response)) {
        return [];
      }
    
      return UserOrganizationsInfoSchema.parse(response);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states a read operation ('Get') but doesn't disclose behavioral traits such as authentication requirements, rate limits, pagination, error handling, or what 'current user' means in context. This leaves significant gaps for an agent to understand how to use it effectively.

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 no wasted words. It front-loads the core purpose efficiently, making it easy for an agent to parse quickly.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what the return value looks like (e.g., list format, fields included) or address potential complexities like multi-organization scenarios. For a tool with no structured support, more context is needed.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't add param details, earning a baseline score of 4 for not overloading with unnecessary information.

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 ('list of organizations the current user belongs to'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_current_organization_info' or 'list_organization_members', which could have overlapping contexts.

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. With sibling tools like 'get_current_organization_info' and 'list_organization_members', the description lacks context on whether this tool is for personal membership retrieval versus broader organizational queries.

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/aliyun/alibabacloud-devops-mcp-server'

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