Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

list_commits

Retrieve commit history from an Alibaba Cloud Codeup repository to track code changes, filter by date, author, or file path, and monitor development progress.

Instructions

[Code Management] List commits in a Codeup repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYes组织ID
repositoryIdYes代码库ID或者URL-Encoder编码的全路径
refNameYes分支名称、标签名称或提交版本,默认为代码库默认分支
sinceNo提交起始时间,格式:YYYY-MM-DDTHH:MM:SSZ
untilNo提交截止时间,格式:YYYY-MM-DDTHH:MM:SSZ
pageNo页码
perPageNo每页大小
pathNo文件路径
searchNo搜索关键字
showSignatureNo是否展示签名
committerIdsNo提交人ID列表(多个ID以逗号隔开)

Implementation Reference

  • Handler logic for the 'list_commits' tool: parses input parameters using the schema, calls the listCommits function, and formats the response as JSON text.
    case 'list_commits':
      const listCommitsParams = ListCommitsRequestSchema.parse(request.params.arguments);
      const listCommitsResult = await listCommits(listCommitsParams);
      return {
        content: [{ type: "text", text: JSON.stringify(listCommitsResult, null, 2) }],
      };
  • Registration of the 'list_commits' tool, including name, description, and input schema.
      name: 'list_commits',
      description: '[Code Management] List commits in a Codeup repository',
      inputSchema: zodToJsonSchema(ListCommitsRequestSchema),
    },
  • Zod schema definition for ListCommitsRequestSchema used for input validation.
    export const ListCommitsRequestSchema = z.object({
      organizationId: z.string().describe("组织ID"),
      repositoryId: z.string().describe("代码库ID或者URL-Encoder编码的全路径"),
      refName: z.string().describe("分支名称、标签名称或提交版本,默认为代码库默认分支"),
      since: z.string().optional().describe("提交起始时间,格式:YYYY-MM-DDTHH:MM:SSZ"),
      until: z.string().optional().describe("提交截止时间,格式:YYYY-MM-DDTHH:MM:SSZ"),
      page: z.number().int().optional().describe("页码"),
      perPage: z.number().int().optional().describe("每页大小"),
      path: z.string().optional().describe("文件路径"),
      search: z.string().optional().describe("搜索关键字"),
      showSignature: z.boolean().optional().describe("是否展示签名"),
      committerIds: z.string().optional().describe("提交人ID列表(多个ID以逗号隔开)"),
    });
  • Core implementation of listCommits: builds API URL with query params, makes GET request to Codeup API, parses and returns list of commits.
    export async function listCommits(params: z.infer<typeof ListCommitsRequestSchema>) {
      const {
        organizationId,
        repositoryId,
        refName,
        since,
        until,
        page,
        perPage,
        path,
        search,
        showSignature,
        committerIds
      } = params;
    
      const encodedRepoId = handleRepositoryIdEncoding(repositoryId);
      
      const baseUrl = `/oapi/v1/codeup/organizations/${organizationId}/repositories/${encodedRepoId}/commits`;
    
      const queryParams: Record<string, string | number | undefined> = {
        refName: refName
      };
      
      if (since !== undefined) {
        queryParams.since = since;
      }
      
      if (until !== undefined) {
        queryParams.until = until;
      }
      
      if (page !== undefined) {
        queryParams.page = page;
      }
      
      if (perPage !== undefined) {
        queryParams.perPage = perPage;
      }
      
      if (path !== undefined) {
        queryParams.path = path;
      }
      
      if (search !== undefined) {
        queryParams.search = search;
      }
      
      if (showSignature !== undefined) {
        queryParams.showSignature = String(showSignature);
      }
      
      if (committerIds !== undefined) {
        queryParams.committerIds = committerIds;
      }
    
      const url = buildUrl(baseUrl, queryParams);
    
      const response: any = await yunxiaoRequest(url, {
        method: "GET",
      });
    
      if (!Array.isArray(response)) {
        return [];
      }
    
      return response.map(commit => DevopsCommitVOSchemaType.parse(commit));
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It doesn't mention whether this is a read-only operation, pagination behavior, rate limits, authentication requirements, or what the return format looks like. For a list operation with 11 parameters, this is inadequate.

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 - a single sentence with zero wasted words. It's front-loaded with the core purpose and efficiently structured despite its brevity.

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 complex tool with 11 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, how results are structured, pagination behavior, or any behavioral constraints. The single sentence fails to provide adequate context for proper tool selection and 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?

Schema description coverage is 100%, so the schema already documents all 11 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, meeting the baseline expectation when 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 action ('List commits') and resource ('in a Codeup repository'), providing specific verb+resource pairing. It doesn't distinguish from sibling tools like 'get_commit' or 'compare', but the purpose is unambiguous.

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 'get_commit' (for single commit) or 'compare' (for commit comparisons). It lacks any context about appropriate use cases or exclusions.

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