Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

get_repository

Retrieve details about a Codeup repository from Alibaba Cloud DevOps platform by providing organization and repository identifiers for code management tasks.

Instructions

[Code Management] Get information about a Codeup repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID, can be found in the basic information page of the organization admin console
repositoryIdYesRepository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)

Implementation Reference

  • Tool handler implementation that parses input arguments, calls the getRepositoryFunc helper, and formats the response as JSON text.
    case "get_repository": {
      const args = types.GetRepositorySchema.parse(request.params.arguments);
      const repository = await repositories.getRepositoryFunc(
        args.organizationId,
        args.repositoryId
      );
      return {
        content: [{ type: "text", text: JSON.stringify(repository, null, 2) }],
      };
    }
  • Zod input schema for validating arguments to the get_repository tool: organizationId and repositoryId.
    export const GetRepositorySchema = z.object({
      organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
      repositoryId: z.string().describe("Repository ID or a combination of organization ID and repository name, for example: 2835387 or organizationId%2Frepo-name (Note: slashes need to be URL encoded as %2F)"),
    });
  • Tool registration defining the name, description, and input schema for get_repository.
    {
      name: "get_repository",
      description: "[Code Management] Get information about a Codeup repository",
      inputSchema: zodToJsonSchema(types.GetRepositorySchema),
    },
  • Core helper function that encodes repositoryId, constructs API URL, fetches data via yunxiaoRequest, and parses response with RepositorySchema.
    export async function getRepositoryFunc(
      organizationId: string,
      repositoryId: string
    ): Promise<z.infer<typeof RepositorySchema>> {
      const encodedRepoId = handleRepositoryIdEncoding(repositoryId);
    
      const url = `/oapi/v1/codeup/organizations/${organizationId}/repositories/${encodedRepoId}`;
    
      const response = await yunxiaoRequest(url, {
        method: "GET",
      });
    
      return RepositorySchema.parse(response);
    }

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