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;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates a comment but doesn't mention whether this is a write operation, what permissions are required, whether comments are editable/deletable, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 gets straight to the point with no wasted words. The bracketed '[Project Management]' provides helpful domain context upfront. However, it could be slightly more front-loaded by placing the core action first instead of the domain label.

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 mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after creation (e.g., returns the new comment ID, triggers notifications), what error conditions might occur, or how this differs from similar comment creation tools. The 100% schema coverage helps with parameters but doesn't compensate for missing behavioral 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%, with all three parameters clearly documented in the schema itself. The description doesn't add any parameter-specific information beyond what's already in the schema (organizationId, workItemId, content). This meets the baseline of 3 when schema coverage is complete.

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 ('Create a comment') and the target ('for a specific work item'), with the bracketed '[Project Management]' providing domain context. However, it doesn't explicitly differentiate from sibling tools like 'create_change_request_comment' or 'create_commit_comment', which perform similar comment creation in different contexts.

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 like 'create_change_request_comment' or 'create_commit_comment', nor does it mention prerequisites such as having an existing work item. It simply states what the tool does without contextual usage information.

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