Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

list_repositories

Retrieve and manage CodeUp repository lists from Alibaba Cloud DevOps platform to view and organize source code repositories by organization, with pagination, search, and sorting capabilities.

Instructions

[Code Management] Get the CodeUp Repository List.

A Repository serves as a unit for managing source code and is distinct from a Project.

Use Case:

View my repositories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID, can be found in the basic information page of the organization admin console
pageNoPage number, default starts from 1, generally should not exceed 150 pages
perPageNoItems per page, default 20, value range [1, 100]
orderByNoSort field, options include {created_at, name, path, last_activity_at}, default is created_atcreated_at
sortNoSort order, options include {asc, desc}, default is descdesc
searchNoSearch keyword, used to fuzzy match repository paths
archivedNoWhether archived

Implementation Reference

  • Tool handler for list_repositories: parses input schema, calls the core listRepositoriesFunc, and returns JSON stringified result.
    case "list_repositories": {
      const args = types.ListRepositoriesSchema.parse(request.params.arguments);
      const repositoryList = await repositories.listRepositoriesFunc(
        args.organizationId,
        args.page,
        args.perPage,
        args.orderBy,
        args.sort,
        args.search ?? undefined,
        args.archived
      );
      return {
        content: [{ type: "text", text: JSON.stringify(repositoryList, null, 2) }],
      };
    }
  • Core implementation of listRepositoriesFunc: builds API URL with query params, makes GET request to Yunxiao API, parses response with RepositorySchema.
    export async function listRepositoriesFunc(
      organizationId: string,
      page?: number,
      perPage?: number,
      orderBy?: string,
      sort?: string,
      search?: string,
      archived?: boolean
    ): Promise<z.infer<typeof RepositorySchema>[]> {
      const baseUrl = `/oapi/v1/codeup/organizations/${organizationId}/repositories`;
    
      const queryParams: Record<string, string | number | undefined> = {};
      
      if (page !== undefined) {
        queryParams.page = page;
      }
      
      if (perPage !== undefined) {
        queryParams.perPage = perPage;
      }
      
      if (orderBy !== undefined) {
        queryParams.orderBy = orderBy;
      }
      
      if (sort !== undefined) {
        queryParams.sort = sort;
      }
      
      if (search !== undefined) {
        queryParams.search = search;
      }
      
      if (archived !== undefined) {
        queryParams.archived = String(archived); // Convert boolean to string
      }
    
      const url = buildUrl(baseUrl, queryParams);
    
      const response = await yunxiaoRequest(url, {
        method: "GET",
      });
    
      if (!Array.isArray(response)) {
        return [];
      }
    
      return response.map(repo => RepositorySchema.parse(repo));
    } 
  • Zod schema definition for ListRepositories input validation, defining parameters like organizationId, pagination, sorting, search, and archived filter.
    export const ListRepositoriesSchema = 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, default starts from 1, generally should not exceed 150 pages"),
      perPage: z.number().int().default(20).optional().describe("Items per page, default 20, value range [1, 100]"),
      orderBy: z.string().default("created_at").optional().describe("Sort field, options include {created_at, name, path, last_activity_at}, default is created_at"),
      sort: z.string().default("desc").optional().describe("Sort order, options include {asc, desc}, default is desc"),
      search: z.string().nullable().optional().describe("Search keyword, used to fuzzy match repository paths"),
      archived: z.boolean().default(false).optional().describe("Whether archived"),
    });
  • Registers the list_repositories tool in the tool registry with name, description, and input schema derived from ListRepositoriesSchema.
    {
      name: "list_repositories",
      description: "[Code Management] Get the CodeUp Repository List.\n" +
        "\n" +
        "A Repository serves as a unit for managing source code and is distinct from a Project.\n" +
        "\n" +
        "Use Case:\n" +
        "\n" +
        "View my repositories",
      inputSchema: zodToJsonSchema(types.ListRepositoriesSchema),
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but reveals minimal behavioral traits. It doesn't disclose whether this is a read-only operation, if it requires authentication, rate limits, pagination behavior beyond what's in the schema, or what format the returned list takes. The description adds almost no behavioral context beyond the basic purpose.

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 appropriately brief with three sentences, though the bracketed '[Code Management]' prefix adds minimal value. The purpose is front-loaded, and the use case section is concise, though it could be integrated more smoothly into the main description.

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 7-parameter list tool with no annotations and no output schema, the description is insufficient. It doesn't explain what information is returned about each repository, how pagination works in practice, or provide context about the relationship between repositories and other entities like projects or organizations mentioned in the parameters.

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?

With 100% schema description coverage, the baseline is 3. The description adds no parameter-specific information beyond what's already documented in the schema. It doesn't explain relationships between parameters or provide additional context about how parameters affect the returned results.

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 verb ('Get') and resource ('CodeUp Repository List'), and distinguishes repositories from projects. However, it doesn't explicitly differentiate from sibling list tools like list_branches or list_commits, which would be needed for a perfect score.

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 a generic 'View my repositories' use case but offers no guidance on when to use this tool versus alternatives like get_repository (for single repo) or search_projects (for projects). No explicit when-not-to-use or prerequisite information is included.

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