Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

list_change_requests

Retrieve and filter change requests from Alibaba Cloud DevOps projects to track code modifications, review status, and author activity.

Instructions

[Code Management] List change requests

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID, can be found in the basic information page of the organization admin console
pageNoPage number
perPageNoItems per page
projectIdsNoRepository ID or a combination of organization ID and repository name list, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F), multiple separated by commas
authorIdsNoCreator user ID list, multiple separated by commas
reviewerIdsNoReviewer user ID list, multiple separated by commas
stateNoMerge request filter status. Possible values: opened, merged, closed. Default is null, which queries all statuses
searchNoTitle keyword search
orderByNoSort field. Possible values: created_at (creation time), updated_at (update time, default)updated_at
sortNoSort order. Possible values: asc (ascending), desc (descending, default)desc
createdBeforeNoStart creation time, time format is ISO 8601, for example: 2019-03-15T08:00:00Z
createdAfterNoEnd creation time, time format is ISO 8601, for example: 2019-03-15T08:00:00Z

Implementation Reference

  • The handler function for the 'list_change_requests' tool. It parses the input arguments using the schema, calls the listChangeRequestsFunc helper, and returns the result as a JSON string in the response content.
    case "list_change_requests": {
      const args = types.ListChangeRequestsSchema.parse(request.params.arguments);
      const changeRequestList = await changeRequests.listChangeRequestsFunc(
        args.organizationId,
        args.page,
        args.perPage,
        args.projectIds ?? undefined,
        args.authorIds ?? undefined,
        args.reviewerIds ?? undefined,
        args.state ?? undefined,
        args.search ?? undefined,
        args.orderBy,
        args.sort,
        args.createdBefore ?? undefined,
        args.createdAfter ?? undefined
      );
      return {
        content: [{ type: "text", text: JSON.stringify(changeRequestList, null, 2) }],
      };
    }
  • Zod schema defining the input parameters for the list_change_requests tool, including organizationId, pagination, filters, sorting, etc.
    export const ListChangeRequestsSchema = z.object({
      organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
      page: z.number().int().default(1).optional().describe("Page number"),
      perPage: z.number().int().default(20).optional().describe("Items per page"),
      projectIds: z.string().nullable().optional().describe("Repository ID or a combination of organization ID and repository name list, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F), multiple separated by commas"),
      authorIds: z.string().nullable().optional().describe("Creator user ID list, multiple separated by commas"),
      reviewerIds: z.string().nullable().optional().describe("Reviewer user ID list, multiple separated by commas"),
      state: z.string().nullable().optional().describe("Merge request filter status. Possible values: opened, merged, closed. Default is null, which queries all statuses"),
      search: z.string().nullable().optional().describe("Title keyword search"),
      orderBy: z.string().default("updated_at").optional().describe("Sort field. Possible values: created_at (creation time), updated_at (update time, default)"),
      sort: z.string().default("desc").optional().describe("Sort order. Possible values: asc (ascending), desc (descending, default)"),
      createdBefore: z.string().nullable().optional().describe("Start creation time, time format is ISO 8601, for example: 2019-03-15T08:00:00Z"),
      createdAfter: z.string().nullable().optional().describe("End creation time, time format is ISO 8601, for example: 2019-03-15T08:00:00Z"),
    });
  • Tool registration entry for 'list_change_requests', specifying name, description, and input schema.
    {
      name: "list_change_requests",
      description: "[Code Management] List change requests",
      inputSchema: zodToJsonSchema(types.ListChangeRequestsSchema),
    },
  • The helper function that constructs the API URL with query parameters and fetches the list of change requests from the Codeup API, parsing the response with ChangeRequestSchema.
    export async function listChangeRequestsFunc(
      organizationId: string,
      page?: number,
      perPage?: number,
      projectIds?: string,
      authorIds?: string,
      reviewerIds?: string,
      state?: string, // Possible values: opened, merged, closed
      search?: string,
      orderBy?: string, // Possible values: created_at, updated_at
      sort?: string, // Possible values: asc, desc
      createdBefore?: string,
      createdAfter?: string
    ): Promise<z.infer<typeof ChangeRequestSchema>[]> {
      const baseUrl = `/oapi/v1/codeup/organizations/${organizationId}/changeRequests`;
      
      // 构建查询参数
      const queryParams: Record<string, string | number | undefined> = {};
      
      if (page !== undefined) {
        queryParams.page = page;
      }
      
      if (perPage !== undefined) {
        queryParams.perPage = perPage;
      }
      
      if (projectIds !== undefined) {
        queryParams.projectIds = projectIds;
      }
      
      if (authorIds !== undefined) {
        queryParams.authorIds = authorIds;
      }
      
      if (reviewerIds !== undefined) {
        queryParams.reviewerIds = reviewerIds;
      }
      
      if (state !== undefined) {
        queryParams.state = state;
      }
      
      if (search !== undefined) {
        queryParams.search = search;
      }
      
      if (orderBy !== undefined) {
        queryParams.orderBy = orderBy;
      }
      
      if (sort !== undefined) {
        queryParams.sort = sort;
      }
      
      if (createdBefore !== undefined) {
        queryParams.createdBefore = createdBefore;
      }
      
      if (createdAfter !== undefined) {
        queryParams.createdAfter = createdAfter;
      }
    
      // 使用buildUrl函数构建包含查询参数的URL
      const url = buildUrl(baseUrl, queryParams);
    
      const response = await yunxiaoRequest(url, {
        method: "GET",
      });
    
      // 确保响应是数组
      if (!Array.isArray(response)) {
        return [];
      }
    
      // 解析每个变更请求对象
      return response.map(changeRequest => ChangeRequestSchema.parse(changeRequest));
    }
Behavior1/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 of behavioral disclosure. The description only states 'List change requests' without explaining what the tool returns (e.g., a paginated list of change requests with metadata), how it behaves (e.g., requires organization context, supports filtering), or any operational constraints (e.g., rate limits, authentication needs). For a tool with 12 parameters and no output schema, this is a significant gap in behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise ('[Code Management] List change requests') but suffers from under-specification rather than effective brevity. While it's front-loaded with the core action, it lacks the necessary detail to be helpful. Every sentence should earn its place, but this single phrase doesn't provide enough value beyond the tool name. It's not verbose, but it's inadequately brief.

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 (12 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what 'change requests' are in this context, what the tool returns, or how to interpret results. While the input schema is well-documented, the description fails to provide necessary context about the tool's purpose, behavior, and output, leaving significant gaps for an AI agent to understand and use it effectively.

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%, meaning all 12 parameters are well-documented in the input schema with descriptions, defaults, and examples. The description adds no additional parameter information beyond what's in the schema. According to the rules, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description. The description doesn't compensate or add value, but the schema does the heavy lifting.

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

Purpose2/5

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

The description '[Code Management] List change requests' is essentially a tautology that restates the tool name with minimal context. While 'List change requests' indicates a retrieval operation, it lacks specificity about what 'change requests' are (e.g., merge requests, pull requests) and doesn't distinguish this tool from sibling list tools like list_change_request_comments or list_change_request_patch_sets. The '[Code Management]' prefix adds some domain context but is too vague to be helpful.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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. There are multiple sibling tools for listing different entities (e.g., list_commits, list_branches, list_change_request_comments), but the description doesn't explain that this tool specifically lists change requests (likely merge/pull requests) versus other code management entities. No prerequisites, exclusions, or comparison to other tools are mentioned.

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