Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

create_repository

Create an empty Codeup repository for your project, ready to push code via git.

Instructions

[Code Management] Create a new Codeup repository.

Creates an empty code repository that can then be pushed to via git.

Use Cases:

Create a new repository for a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID, can be found in the basic information page of the organization admin console
nameYesRepository name, e.g. my-repo
pathYesRepository path, e.g. my-repo
descriptionNoRepository description, max 65535 characters
namespaceIdNoParent path ID (namespace). If empty, created under the organization root
visibilityNoRepository visibility: private or internal
avatarUrlNoRepository avatar URL
readMeTypeNoType of README to auto-create: EMPTY or USER_GUIDE
templateProjectNoCreate repository from template

Implementation Reference

  • Main handler function that creates a codeup repository by calling the API. Builds the request body from params, sends a POST request, and returns the parsed repository response.
    export async function createRepositoryFunc(
      organizationId: string | undefined,
      params: z.infer<typeof CreateRepositorySchema>
    ): Promise<z.infer<typeof RepositorySchema>> {
      const finalOrgId = await resolveOrganizationId(organizationId);
      const baseUrl = isRegionEdition()
        ? `/oapi/v1/codeup/repositories`
        : `/oapi/v1/codeup/organizations/${finalOrgId}/repositories`;
    
      const body: Record<string, unknown> = {
        name: params.name,
        path: params.path,
      };
      if (params.description) body.description = params.description;
      if (params.namespaceId) body.namespaceId = params.namespaceId;
      if (params.visibility) body.visibility = params.visibility;
      if (params.avatarUrl) body.avatarUrl = params.avatarUrl;
      if (params.readMeType) body.readMeType = params.readMeType;
      if (params.templateProject) body.templateProject = params.templateProject;
    
      const url = buildUrl(baseUrl, { createParentPath: "true" });
    
      const response = await yunxiaoRequest(url, {
        method: "POST",
        body,
      });
    
      return RepositorySchema.parse(response);
    } 
  • Tool handler case for 'create_repository'. Parses the input via CreateRepositorySchema, calls createRepositoryFunc, and returns the result as JSON text content.
    case "create_repository": {
      const args = types.CreateRepositorySchema.parse(request.params.arguments);
      const repository = await repositories.createRepositoryFunc(
        args.organizationId,
        args
      );
      return {
        content: [{ type: "text", text: JSON.stringify(repository, null, 2) }],
      };
    }
  • Zod schema for CreateRepositorySchema defining all input parameters: organizationId (required), name (required), path (required), and optional fields like description, namespaceId, visibility, avatarUrl, readMeType, and templateProject.
    export const CreateRepositorySchema = z.object({
      organizationId: z.string().describe("Organization ID, can be found in the basic information page of the organization admin console"),
      name: z.string().describe("Repository name, e.g. my-repo"),
      path: z.string().describe("Repository path, e.g. my-repo"),
      description: z.string().optional().describe("Repository description, max 65535 characters"),
      namespaceId: z.number().int().optional().describe("Parent path ID (namespace). If empty, created under the organization root"),
      visibility: z.enum(["private", "internal"]).optional().describe("Repository visibility: private or internal"),
      avatarUrl: z.string().optional().describe("Repository avatar URL"),
      readMeType: z.enum(["EMPTY", "USER_GUIDE"]).optional().describe("Type of README to auto-create: EMPTY or USER_GUIDE"),
      templateProject: DevopsRepositoryTemplateCreateDTOSchema.optional().nullable().describe("Create repository from template"),
    });
  • Tool registration entry for 'create_repository' with its name, description, and inputSchema referencing CreateRepositorySchema.
    {
      name: "create_repository",
      description: "[Code Management] Create a new Codeup repository.\n" +
        "\n" +
        "Creates an empty code repository that can then be pushed to via git.\n" +
        "\n" +
        "Use Cases:\n" +
        "\n" +
        "Create a new repository for a project",
      inputSchema: zodToJsonSchema(types.CreateRepositorySchema),
    },
  • Re-exports CreateRepositorySchema from operations/codeup/types.ts so it can be used by both tool-handlers and tool-registry.
    // Repository schemas
    GetRepositorySchema,
    ListRepositoriesSchema,
    CreateRepositorySchema,
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 only mentions the repository is empty and pushable via git, but fails to disclose other behavioral traits such as idempotency, error states (e.g., duplicate name), authentication requirements, or rate limits.

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

Conciseness4/5

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

The description is short and front-loaded with the key action. However, the 'Use Cases' line is redundant with the preceding sentence, slightly reducing conciseness.

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 9 parameters and no output schema, the description provides minimal high-level context. It does not explain the organizational structure or how parameters like visibility and README type relate to the repository creation process, leaving the AI to infer from the schema alone.

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?

Input schema has 100% description coverage, so baseline is 3. The description adds no additional parameter-level information beyond what is already in the schema.

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

Purpose5/5

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

The description clearly states it creates a new Codeup repository, specifying it is empty and can be pushed to via git. It is a specific verb+resource combination with no ambiguity, and it distinguishes itself from sibling tools (none of which create repositories).

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

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No alternatives exist among siblings, so implicit usage is adequate. The description includes a use case ('Create a new repository for a project'), but lacks explicit guidance on when to use or not use, and no prerequisites 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