Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

list_organization_roles

Retrieve available roles within an Alibaba Cloud DevOps organization to manage user permissions and access control for projects and resources.

Instructions

[Organization Management] List organization roles

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID

Implementation Reference

  • Tool handler implementation that parses input arguments using the schema, calls the listOrganizationRolesFunc helper, and returns the roles as a JSON string in the tool response format.
    case "list_organization_roles": {
      const args = types.ListOrganizationRolesSchema.parse(request.params.arguments);
      const roles = await organization.listOrganizationRolesFunc(args.organizationId);
      return {
        content: [{ type: "text", text: JSON.stringify(roles, null, 2)}]
      }
    }
  • Tool registration entry defining the name, description, and input schema for the list_organization_roles tool.
    {
      name: "list_organization_roles",
      description: "[Organization Management] List organization roles",
      inputSchema: zodToJsonSchema(types.ListOrganizationRolesSchema),
    },
  • Zod schema definition for the input parameters of the list_organization_roles tool, requiring organizationId.
    export const ListOrganizationRolesSchema = z.object({
      organizationId: z.string().describe("Organization ID")
    });
  • Core helper function that makes the API request to fetch organization roles and parses the response using the OrganizationRole schema.
    export async function listOrganizationRolesFunc(
        organizationId: string
    ): Promise<z.infer<typeof OrganizationRole>> {
        const url = `/oapi/v1/platform/organizations/${organizationId}/roles`;
    
        const response = await yunxiaoRequest(url, {
            method: "GET"
        });
    
        return OrganizationRole.parse(response);
    }
  • Zod schema definitions for the organization role objects and the array of roles used for output validation in the helper function.
    export const OrganizationRoleSchema = z.object({
      id: z.string().describe("Role ID"),
      name: z.string().describe("Role name"),
      organizationId: z.string().describe("Organization ID"),
      permissions: z.array(z.string()).describe("Role permission list")
    });
    
    export const OrganizationRole = z.array(OrganizationRoleSchema);
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 for behavioral disclosure. It states 'List organization roles' but doesn't describe traits like whether it's read-only (implied by 'list'), pagination behavior, rate limits, authentication needs, or error conditions. For a tool with zero annotation coverage, this is a significant gap in transparency about how it operates.

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 very brief ('[Organization Management] List organization roles'), which is efficient and front-loaded. However, the bracketed prefix adds little value and could be considered minor waste. Overall, it's appropriately sized for a simple tool but lacks depth that might be needed given the context.

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's complexity (a list operation with one parameter) and lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., role names, IDs, permissions), behavioral aspects, or usage context. For a tool in a server with many siblings, more guidance is needed to ensure correct agent invocation.

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 the single parameter 'organizationId' documented as 'Organization ID'. The description adds no additional meaning beyond this, such as format examples or constraints. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema already provides adequate parameter documentation.

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

Purpose3/5

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

The description states the action ('List') and resource ('organization roles'), which provides a basic understanding of purpose. However, it's vague about scope (e.g., all roles vs. filtered) and doesn't differentiate from sibling tools like 'get_organization_role' or 'list_organization_members'. The bracketed '[Organization Management]' adds minimal context but doesn't clarify the specific function.

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. It doesn't mention prerequisites (e.g., needing an organization ID), exclusions, or comparisons to siblings like 'get_organization_role' (singular) or 'list_organization_members'. The description lacks any usage context, leaving the agent to infer based on the name alone.

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