Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

get_commit

Retrieve detailed information about a specific commit in Alibaba Cloud DevOps repositories using organization ID, repository ID, and commit SHA values.

Instructions

[Code Management] Get information about a commit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYes组织ID
repositoryIdYes代码库ID或者URL-Encoder编码的全路径
shaYes提交ID,即Commit SHA值

Implementation Reference

  • Registration of the 'get_commit' tool in the commit tools array, including name, description, and input schema.
    {
      name: 'get_commit',
      description: '[Code Management] Get information about a commit',
      inputSchema: zodToJsonSchema(GetCommitRequestSchema),
    },
  • Handler case in handleCommitTools that parses arguments, calls getCommit, and formats the response for the 'get_commit' tool.
    case 'get_commit':
      const getCommitParams = GetCommitRequestSchema.parse(request.params.arguments);
      const getCommitResult = await getCommit(getCommitParams);
      return {
        content: [{ type: "text", text: JSON.stringify(getCommitResult, null, 2) }],
      };
  • Core implementation of getCommit: constructs API URL and fetches commit details using yunxiaoRequest.
    export async function getCommit(params: z.infer<typeof GetCommitRequestSchema>) {
      const { organizationId, repositoryId, sha } = params;
      
      const encodedRepoId = handleRepositoryIdEncoding(repositoryId);
    
      const url = `/oapi/v1/codeup/organizations/${organizationId}/repositories/${encodedRepoId}/commits/${sha}`;
    
      const response: any = await yunxiaoRequest(url, {
        method: "GET",
      });
    
      return DevopsCommitVOSchemaType.parse(response);
    }
  • Zod schema defining input parameters for get_commit: organizationId, repositoryId, sha.
    export const GetCommitRequestSchema = z.object({
      organizationId: z.string().describe("组织ID"),
      repositoryId: z.string().describe("代码库ID或者URL-Encoder编码的全路径"),
      sha: z.string().describe("提交ID,即Commit SHA值"),
    });
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. It states this is a 'Get' operation, implying read-only behavior, but doesn't disclose any behavioral traits like authentication requirements, rate limits, error conditions, or what specific commit information is returned. For a tool with zero annotation coverage, this is a significant gap.

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 just two parts: a domain context '[Code Management]' and the core purpose 'Get information about a commit'. Every word earns its place with zero waste, making it front-loaded and efficient.

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 has no annotations and no output schema, the description is incomplete. It doesn't explain what commit information is returned, potential error cases, or behavioral constraints. For a read operation in a code management context with rich sibling tools, more context would be helpful for an AI agent to 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%, so the schema already documents all three parameters (organizationId, repositoryId, sha) with descriptions. The tool description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline of 3 where 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 tool's purpose as 'Get information about a commit' with a specific verb ('Get') and resource ('commit'), and includes a domain context '[Code Management]'. However, it doesn't explicitly differentiate from sibling tools like 'list_commits' or 'get_branch', which would require a 5.

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. There are multiple sibling tools for retrieving commit-related information (e.g., 'list_commits', 'get_change_request'), but no indication of when this specific 'get_commit' tool is appropriate versus those others.

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