Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

search_organization_members

Find organization members in Alibaba Cloud DevOps by searching with department IDs, roles, statuses, or query terms to manage team access and permissions.

Instructions

[Organization Management] Search for organization members

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID, can be found in the basic information page of the organization admin console
deptIdsNoDepartment IDs to search for
queryNoSearch query
includeChildrenNoWhether to include sub-departments
nextTokenNoNext token for pagination
roleIdsNoRole IDs to search for
statusesNoUser statuses, posibble values: ENABLED,DISABLED,UNDELETED,DELETED,NORMAL_USING,UNVISITED。ENABLED=NORMAL_USING+UNVISITED;UNDELETED=ENABLED+DISABLED
pageNoCurrent page number, defaults to 1
perPageNoNumber of items per page, defaults to 100

Implementation Reference

  • Tool handler switch case that parses input arguments using SearchOrganizationMembersSchema, calls the searchOrganizationMembersFunc with resolved parameters, and returns the result as a formatted text response.
    case "search_organization_members": {
      const args = types.SearchOrganizationMembersSchema.parse(request.params.arguments);
      const membersResult = await members.searchOrganizationMembersFunc(
        args.organizationId,
        args.includeChildren ?? false,
        args.page ?? 1,
        args.perPage ?? 100,
        args.deptIds ?? undefined,
        args.nextToken ?? undefined,
        args.query ?? undefined,
        args.roleIds ?? undefined,
        args.statuses ?? undefined,
      )
      return {
        content: [{ type: "text", text: JSON.stringify(membersResult, null, 2)}]
      }
    }
  • Core implementation function that constructs the API payload for searching organization members and makes a POST request to the members:search endpoint, validates and returns the response.
    export const searchOrganizationMembersFunc = async (
        organizationId: string,
        includeChildren: boolean = false,
        page: number = 1,
        perPage: number = 100,
        deptIds?: string[],
        nextToken? : string,
        query? : string,
        roleIds? : string[],
        statuses?: string[],
    
    ): Promise<SearchOrganizationMembersResult> => {
      const url = `/oapi/v1/platform/organizations/${organizationId}/members:search`;
    
      const payload: Record<string, any> = {
        page: page,
        perPage: perPage
      };
    
      if (deptIds) {
        payload.deptIds = deptIds;
      }
    
      if (nextToken) {
        payload.nextToken = nextToken;
      }
    
      if (query) {
        payload.query = query;
      }
    
      if (roleIds) {
        payload.roleIds = roleIds;
      }
    
      if (statuses) {
        payload.statuses = statuses;
      }
    
      const response = await yunxiaoRequest(url, {
        method: "POST",
        body: payload,
      });
    
      // 验证响应数据结构
      return SearchOrganizationMembersResultSchema.parse(response);
    };
  • Zod schemas for input parameters (SearchOrganizationMembersSchema) and result (SearchOrganizationMembersResultSchema) along with TypeScript types for the search_organization_members tool.
    export const SearchOrganizationMembersSchema = z.object({
      organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
      deptIds: z.array(z.string()).optional().describe("Department IDs to search for"),
      query: z.string().optional().describe("Search query"),
      includeChildren: z.boolean().optional().describe("Whether to include sub-departments"),
      nextToken: z.string().optional().describe("Next token for pagination"),
      roleIds: z.array(z.string()).optional().describe("Role IDs to search for"),
      statuses: z.array(z.string()).optional().describe("User statuses, posibble values: ENABLED,DISABLED,UNDELETED,DELETED,NORMAL_USING,UNVISITED。ENABLED=NORMAL_USING+UNVISITED;UNDELETED=ENABLED+DISABLED"),
      page: z.number().int().optional().describe("Current page number, defaults to 1"),
      perPage: z.number().int().optional().describe("Number of items per page, defaults to 100")
    });
    
    export const SearchOrganizationMembersResultSchema = z.array(MemberInfoSchema);
    
    export type SearchOrganizationMembersParams = z.infer<typeof SearchOrganizationMembersSchema>;
    export type SearchOrganizationMembersResult = z.infer<typeof SearchOrganizationMembersResultSchema>;
  • Tool registration entry defining the name, description, and input schema for 'search_organization_members' in the organization tools array.
    {
      name: "search_organization_members",
      description: "[Organization Management] Search for organization members",
      inputSchema: zodToJsonSchema(types.SearchOrganizationMembersSchema),
    },
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 it's a search operation without disclosing behavioral traits. It doesn't mention whether this is read-only, has side effects, requires specific permissions, handles pagination details beyond the 'nextToken' parameter, or describes the return format, leaving significant gaps for an agent.

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 with a single, front-loaded sentence that wastes no words. It efficiently conveys the core purpose without unnecessary elaboration, 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 complexity (9 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the search behavior, result format, or how parameters interact (e.g., combining 'query' with 'deptIds'). For a search tool with rich filtering options, more context is needed to guide effective use.

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 the schema fully documents all 9 parameters. The description adds no additional meaning beyond what the schema provides, such as explaining relationships between parameters or search logic. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Search for') and resource ('organization members'), providing a specific purpose. However, it doesn't differentiate from the sibling tool 'list_organization_members', which appears to serve a similar function, preventing a perfect score.

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 like 'list_organization_members' or 'get_organization_member_info'. It lacks context about search capabilities versus listing or retrieval operations, offering minimal usage direction.

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