Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

create_work_item_comment

Add comments to work items in Alibaba Cloud DevOps projects to document discussions, provide updates, or clarify requirements for team collaboration.

Instructions

[Project Management] Create a comment for a specific work item

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYes企业ID,可在组织管理后台的基本信息页面获取
workItemIdYes工作项ID
contentYes评论内容

Implementation Reference

  • Handler for create_work_item_comment tool: parses arguments using schema, calls createWorkItemCommentFunc, and returns JSON response.
    case "create_work_item_comment": { const args = types.CreateWorkItemCommentSchema.parse(request.params.arguments); const comment = await workitem.createWorkItemCommentFunc( args.organizationId, args.workItemId, args.content ); return { content: [{ type: "text", text: JSON.stringify(comment, null, 2) }], }; }
  • Tool registration entry for create_work_item_comment with name, description, and input schema.
    name: "create_work_item_comment", description: "[Project Management] Create a comment for a specific work item", inputSchema: zodToJsonSchema(types.CreateWorkItemCommentSchema), }
  • Zod schema definition for CreateWorkItemComment input validation: organizationId, workItemId, content.
    export const CreateWorkItemCommentSchema = z.object({ organizationId: z.string().describe("企业ID,可在组织管理后台的基本信息页面获取"), workItemId: z.string().describe("工作项ID"), content: z.string().describe("评论内容"), });
  • Core implementation: POST request to Yunxiao API endpoint to create a comment on a work item.
    export async function createWorkItemCommentFunc( organizationId: string, workItemId: string, content: string ): Promise<any> { const url = `/oapi/v1/projex/organizations/${organizationId}/workitems/${workItemId}/comments`; const payload = { content: content }; const response = await yunxiaoRequest(url, { method: "POST", body: payload, }); // 如果响应中包含result字段,则返回result中的数据 if (response && typeof response === 'object' && 'result' in response) { return response.result; } // 否则直接返回响应 return response; }

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