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 []; }

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