Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

list_work_item_comments

Retrieve comments for a specific work item in Alibaba Cloud DevOps to track discussions, review feedback, and monitor progress updates.

Instructions

[Project Management] List comments for a specific work item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYes企业ID,可在组织管理后台的基本信息页面获取
workItemIdYes工作项ID
pageNo页码
perPageNo每页条数

Implementation Reference

  • Main tool handler implementing the tool logic: parses arguments using the schema, calls the helper function to fetch comments, and returns formatted JSON response.
    case "list_work_item_comments": {
      const args = types.ListWorkItemCommentsSchema.parse(request.params.arguments);
      const comments = await workitem.listWorkItemCommentsFunc(
        args.organizationId,
        args.workItemId,
        args.page,
        args.perPage
      );
      return {
        content: [{ type: "text", text: JSON.stringify(comments, null, 2) }],
      };
    }
  • Zod schema defining input parameters: organizationId, workItemId, page, perPage.
    export const ListWorkItemCommentsSchema = z.object({
      organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"),
      workItemId: z.string().describe("工作项ID"),
      page: z.number().int().optional().default(1).describe("页码"),
      perPage: z.number().int().optional().default(20).describe("每页条数"),
    });
  • Tool registration entry specifying name, description, and input schema reference.
    {
      name: "list_work_item_comments",
      description: "[Project Management] List comments for a specific work item",
      inputSchema: zodToJsonSchema(types.ListWorkItemCommentsSchema),
    },
  • Helper function that performs the actual API call to retrieve work item comments using yunxiaoRequest.
    export async function listWorkItemCommentsFunc(
      organizationId: string,
      workItemId: string,
      page: number = 1,
      perPage: number = 20
    ): Promise<any[]> {
      const url = `/oapi/v1/projex/organizations/${organizationId}/workitems/${workItemId}/comments?page=${page}&perPage=${perPage}`;
    
      const response = await yunxiaoRequest(url, {
        method: "GET",
      });
    
      // 确保返回的是数组格式
      if (Array.isArray(response)) {
        return response;
      }
    
      // 如果响应中包含result字段,则返回result中的数据
      if (response && typeof response === 'object' && 'result' in response && Array.isArray(response.result)) {
        return response.result;
      }
    
      // 其他情况返回空数组
      return [];
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists comments but fails to describe key behaviors: it doesn't mention pagination (implied by 'page' and 'perPage' parameters but not explained), return format (e.g., comment objects with fields like author, timestamp, content), error conditions (e.g., invalid work item ID), or any rate limits or authentication requirements. This leaves significant gaps for an agent to understand how the tool behaves in practice.

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 a single, efficient sentence that front-loads the core purpose ('List comments for a specific work item') with a brief domain context ('[Project Management]'). There is no wasted verbiage or redundancy. However, it could be slightly improved by integrating key behavioral hints (e.g., 'with pagination') to enhance clarity without sacrificing brevity.

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's complexity (4 parameters, no output schema, no annotations), the description is incomplete. It lacks details on return values (e.g., comment structure), error handling, pagination behavior, and usage context relative to siblings. While the schema covers parameters, the description fails to provide a holistic view needed for an agent to use the tool effectively, especially for a read operation with multiple inputs and no output schema to guide expectations.

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%, with all parameters well-documented in the schema (e.g., 'organizationId' specifies where to find it, 'page' and 'perPage' have defaults). The description adds no additional parameter semantics beyond what the schema provides—it doesn't clarify parameter interactions (e.g., how pagination works with comment ordering) or usage nuances. Given the high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 action ('List comments') and target resource ('for a specific work item'), with the '[Project Management]' context providing domain clarity. It distinguishes from sibling tools like 'create_work_item_comment' or 'get_work_item' by focusing on listing comments rather than creating or fetching the work item itself. However, it doesn't explicitly differentiate from 'list_change_request_comments' or other comment-listing tools in terms of scope or resource type.

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. It doesn't mention prerequisites (e.g., needing a valid work item ID), exclusions (e.g., not for listing comments on other entities like change requests), or contextual triggers. The agent must infer usage from the tool name and parameters alone, which is insufficient for optimal selection.

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