Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

search_projects

Search for Yunxiao project lists to find projects you manage, participate in, or created using filters like name, status, creation date, and administrator.

Instructions

[Project Management] Search for Yunxiao Project List. A Project is a project management unit that includes work items and sprints, and it is different from a code repository (Repository).

Use Cases:

Query projects I am involved in Query projects I have created

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOrganization ID
nameNoText contained in project name
statusNoProject status ID, multiple separated by commas
createdAfterNoCreated not earlier than, format: YYYY-MM-DD
createdBeforeNoCreated not later than, format: YYYY-MM-DD
creatorNoCreator
adminUserIdNoProject administrator user ID, should use userId returned from getCurrentOrganizationInfoFunc or user-provided user ID, multiple IDs separated by commas
logicalStatusNoLogical status, e.g., NORMAL
scenarioFilterNoPredefined filter scenarios: 'manage' (projects I manage), 'participate' (projects I participate in), 'favorite' (projects I favorited). Will be used to construct appropriate extraConditions. Requires userId from getCurrentOrganizationInfoFunc.
userIdNoUser ID to use with scenarioFilter, should be the userId returned from getCurrentOrganizationInfoFunc
advancedConditionsNoAdvanced filter conditions, JSON format
extraConditionsNoAdditional filter conditions as JSON string. Should be constructed similar to the conditions parameter. For common scenarios: 1) For 'projects I manage': use fieldIdentifier 'project.admin' with the user ID; 2) For 'projects I participate in': use fieldIdentifier 'users' with the user ID; 3) For 'projects I favorited': use fieldIdentifier 'collectMembers' with the user ID. Example: JSON.stringify({conditionGroups:[[{className:'user',fieldIdentifier:'project.admin',format:'multiList',operator:'CONTAINS',value:[userId]}]]})
orderByNoSort field, default is gmtCreate, supports: gmtCreate (creation time), name (name)gmtCreate
pageNoPagination parameter, page number
perPageNoPagination parameter, page size, 0-200, default value is 20
sortNoSort order, default is desc, options: desc (descending), asc (ascending)desc

Implementation Reference

  • Handler for 'search_projects' tool: parses input with SearchProjectsSchema, calls searchProjectsFunc, returns JSON response.
    case "search_projects": {
      const args = types.SearchProjectsSchema.parse(request.params.arguments);
      const projects = await project.searchProjectsFunc(
        args.organizationId,
        args.name ?? undefined,
        args.status ?? undefined,
        args.createdAfter ?? undefined,
        args.createdBefore ?? undefined,
        args.creator ?? undefined,
        args.adminUserId ?? undefined,
        args.logicalStatus ?? undefined,
        args.advancedConditions ?? undefined,
        args.extraConditions ?? undefined,
        args.orderBy,
        args.page,
        args.perPage,
        args.sort,
        args.scenarioFilter ?? undefined,
        args.userId ?? undefined,
      );
      return {
        content: [{ type: "text", text: JSON.stringify(projects, null, 2) }],
      };
    }
  • Registers the 'search_projects' tool in getProjectManagementTools() with name, description, and input schema from types.SearchProjectsSchema.
    {
      name: "search_projects",
      description: "[Project Management] Search for Yunxiao Project List. A Project is a project management unit that includes work items and sprints, and it is different from a code repository (Repository).\n\nUse Cases:\n\nQuery projects I am involved in\nQuery projects I have created",
      inputSchema: zodToJsonSchema(types.SearchProjectsSchema),
    },
  • Zod schema SearchProjectsSchema defining input parameters for searching projects, including filters, pagination, and advanced conditions.
    export const SearchProjectsSchema = z.object({
      organizationId: z.string().describe("Organization ID"),
    
      // Simplified search parameters
      name: z.string().nullable().optional().describe("Text contained in project name"),
      status: z.string().nullish().optional().describe("Project status ID, multiple separated by commas"),
      createdAfter: z.string().nullable().optional().describe("Created not earlier than, format: YYYY-MM-DD"),
      createdBefore: z.string().nullable().optional().describe("Created not later than, format: YYYY-MM-DD"),
      creator: z.string().nullable().optional().describe("Creator"),
      adminUserId: z.string().nullable().optional().describe("Project administrator user ID, should use userId returned from getCurrentOrganizationInfoFunc or user-provided user ID, multiple IDs separated by commas"),
      logicalStatus: z.string().nullable().optional().describe("Logical status, e.g., NORMAL"),
    
      // Special filter for common scenarios
      scenarioFilter: z.enum(["manage", "participate", "favorite"]).nullable().optional().describe("Predefined filter scenarios: 'manage' (projects I manage), 'participate' (projects I participate in), 'favorite' (projects I favorited). Will be used to construct appropriate extraConditions. Requires userId from getCurrentOrganizationInfoFunc."),
      userId: z.string().nullable().optional().describe("User ID to use with scenarioFilter, should be the userId returned from getCurrentOrganizationInfoFunc"),
    
      // Advanced parameters
      advancedConditions: z.string().nullable().optional().describe("Advanced filter conditions, JSON format"),
      extraConditions: z.string().nullable().optional().describe("Additional filter conditions as JSON string. Should be constructed similar to the conditions parameter. For common scenarios: 1) For 'projects I manage': use fieldIdentifier 'project.admin' with the user ID; 2) For 'projects I participate in': use fieldIdentifier 'users' with the user ID; 3) For 'projects I favorited': use fieldIdentifier 'collectMembers' with the user ID. Example: JSON.stringify({conditionGroups:[[{className:'user',fieldIdentifier:'project.admin',format:'multiList',operator:'CONTAINS',value:[userId]}]]})"),
      orderBy: z.string().optional().default("gmtCreate").describe("Sort field, default is gmtCreate, supports: gmtCreate (creation time), name (name)"),
      page: z.number().int().default(1).optional().describe("Pagination parameter, page number"),
      perPage: z.number().int().default(20).optional().describe("Pagination parameter, page size, 0-200, default value is 20"),
      sort: z.string().optional().default("desc").describe("Sort order, default is desc, options: desc (descending), asc (ascending)"),
    });
  • Core implementation of searchProjectsFunc: builds search payload with conditions and extraConditions, POSTs to Yunxiao API /projects:search, parses array of projects with ProjectInfoSchema.
    export async function searchProjectsFunc(
      organizationId: string,
      name?: string,
      status?: string,
      createdAfter?: string,
      createdBefore?: string,
      creator?: string,
      adminUserId?: string, // Project administrator user ID
      logicalStatus?: string,
      advancedConditions?: string,
      extraConditions?: string, // Should be constructed using buildExtraConditions for common filters
      orderBy?: string, // Possible values: "gmtCreate", "name"
      page?: number,
      perPage?: number,
      sort?: string, // Possible values: "desc", "asc"
      scenarioFilter?: "manage" | "participate" | "favorite", // Common project filter scenarios
      userId?: string // User ID to use with scenarioFilter
    ): Promise<z.infer<typeof ProjectInfoSchema>[]> {
      const url = `/oapi/v1/projex/organizations/${organizationId}/projects:search`;
    
      const payload: Record<string, any> = {};
    
      if (scenarioFilter && userId) {
        extraConditions = buildExtraConditions(scenarioFilter, userId);
      }
    
      const conditions = buildProjectConditions({
        name,
        status,
        createdAfter,
        createdBefore,
        creator,
        adminUserId,
        logicalStatus,
        advancedConditions
      });
      
      if (conditions) {
        payload.conditions = conditions;
      }
    
      if (extraConditions) {
        payload.extraConditions = extraConditions;
      }
    
      if (orderBy) {
        payload.orderBy = orderBy;
      }
    
      if (page !== undefined) {
        payload.page = page;
      }
    
      if (perPage !== undefined) {
        payload.perPage = perPage;
      }
    
      if (sort) {
        payload.sort = sort;
      }
    
      const response = await yunxiaoRequest(url, {
        method: "POST",
        body: payload,
      });
    
      if (!Array.isArray(response)) {
        return [];
      }
    
      return response.map(project => ProjectInfoSchema.parse(project));
    }
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. While it indicates this is a search/query operation, it doesn't mention important behavioral aspects like whether this requires authentication, rate limits, pagination behavior (beyond what's in parameters), or what the return format looks like. For a 16-parameter search tool with no annotation coverage, 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.

Conciseness3/5

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

The description is reasonably concise with two sentences and two bullet points, but the structure could be improved. The first sentence is somewhat verbose ('[Project Management] Search for Yunxiao Project List'), and the use cases could be integrated more naturally rather than as separate bullet points.

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 16-parameter search tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the search returns (project objects? just IDs?), how results are structured, or provide guidance on the many filtering options. The use cases help but don't compensate for the missing behavioral and output context.

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?

The schema description coverage is 100%, so all parameters are documented in the schema. The description doesn't add any meaningful parameter semantics beyond what's already in the schema - it doesn't explain how parameters interact, which combinations are most useful, or provide examples. Baseline 3 is appropriate when the schema does all the work.

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 searches for project lists in a project management context, specifying it's for 'Yunxiao Project List' and distinguishing projects from code repositories. However, it doesn't explicitly differentiate from sibling tools like 'get_project' or 'list_sprints', which prevents 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 Guidelines3/5

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

The description provides two use cases ('Query projects I am involved in' and 'Query projects I have created'), which gives implied guidance on when to use this tool. However, it doesn't explicitly state when NOT to use it or mention alternatives among the many sibling tools, leaving room for confusion.

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