Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

update_estimated_effort

Update estimated work hours for tasks in Alibaba Cloud DevOps projects to maintain accurate project planning and resource allocation.

Instructions

[Project Management] 更新登记预计工时

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesorganizationId
workitemIdYes工作项唯一标识
idYes预计工时记录唯一标识
descriptionNo工作描述
operatorIdNo操作者的useId,个人token时该参数无效
ownerYes负责人,填userId
spentTimeYes预计工时
workTypeNo工作类别

Implementation Reference

  • MCP tool handler switch case that parses input arguments using the schema and delegates to the underlying updateEstimatedEffort function from operations/projex/effort.ts, returning a success message.
    case "update_estimated_effort": {
      const args = types.UpdateEstimatedEffortSchema.parse(request.params.arguments);
      await effort.updateEstimatedEffort({
        organizationId: args.organizationId,
        workitemId: args.workitemId,
        id: args.id,
        description: args.description,
        operatorId: args.operatorId,
        owner: args.owner,
        spentTime: args.spentTime,
        workType: args.workType
      });
      return {
        content: [{ type: "text", text: "Estimated effort updated successfully" }],
      };
    }
  • Zod schema defining the input parameters for the update_estimated_effort tool, including organizationId, workitemId, id, description, operatorId, owner, spentTime, and workType.
    export const UpdateEstimatedEffortSchema = z.object({
      organizationId: z.string().describe("organizationId"),
      workitemId: z.string().describe("工作项唯一标识"),
      id: z.string().describe("预计工时记录唯一标识"),
      description: z.string().max(500).optional().describe("工作描述"),
      operatorId: z.string().optional().describe("操作者的useId,个人token时该参数无效"),
      owner: z.string().describe("负责人,填userId"),
      spentTime: z.number().positive().describe("预计工时"),
      workType: z.string().optional().describe("工作类别"),
    });
  • Registration of the update_estimated_effort tool in the getEffortTools array, specifying name, description, and input schema.
    {
      name: "update_estimated_effort",
      description: "[Project Management] 更新登记预计工时",
      inputSchema: zodToJsonSchema(UpdateEstimatedEffortSchema),
    }
  • The core helper function that performs the actual API update by constructing the URL and sending a PUT request via yunxiaoRequest to the projex estimatedEfforts endpoint.
    export async function updateEstimatedEffort(
      params: z.infer<typeof CreateEstimatedEffortRequestSchema> & {
        organizationId: string;
        workitemId: string;
        id: string;
      }
    ) {
      const validatedParams = CreateEstimatedEffortRequestSchema.parse({
        description: params.description,
        operatorId: params.operatorId,
        owner: params.owner,
        spentTime: params.spentTime,
        workType: params.workType
      });
      
      const url = `/oapi/v1/projex/organizations/${params.organizationId}/workitems/${params.workitemId}/estimatedEfforts/${params.id}`;
      
      const response = await yunxiaoRequest(url, {
        method: "PUT",
        body: validatedParams
      });
    
      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