Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

update_effort_record

Modify logged work hours for specific tasks in Alibaba Cloud DevOps projects to maintain accurate time tracking and project management records.

Instructions

[Project Management] 更新登记实际工时

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationIdYesorganizationId
workitemIdYes工作项唯一标识
idYes工时记录唯一标识
actualTimeYes实际工时
descriptionNo工作描述
gmtEndYes工作开始结束日期
gmtStartYes工作开始日期
operatorIdNo操作者的useId,个人token时该参数无效
workTypeNo工作类型

Implementation Reference

  • MCP tool handler for 'update_effort_record': parses input arguments using UpdateEffortRecordSchema and calls the underlying effort.updateEffortRecord function.
    case "update_effort_record": {
      const args = types.UpdateEffortRecordSchema.parse(request.params.arguments);
      await effort.updateEffortRecord({
        organizationId: args.organizationId,
        workitemId: args.workitemId,
        id: args.id,
        actualTime: args.actualTime,
        description: args.description,
        gmtEnd: args.gmtEnd,
        gmtStart: args.gmtStart,
        operatorId: args.operatorId,
        workType: args.workType
      });
      return {
        content: [{ type: "text", text: "Effort record updated successfully" }],
      };
    }
  • Core implementation of updateEffortRecord: validates parameters, constructs API URL, and performs PUT request to update the effort record via yunxiaoRequest.
    export async function updateEffortRecord(
      params: z.infer<typeof CreateEffortRecordRequestSchema> & {
        organizationId: string;
        workitemId: string;
        id: string;
      }
    ) {
      const validatedParams = CreateEffortRecordRequestSchema.parse({
        actualTime: params.actualTime,
        description: params.description,
        gmtEnd: params.gmtEnd,
        gmtStart: params.gmtStart,
        operatorId: params.operatorId,
        workType: params.workType
      });
      
      const url = `/oapi/v1/projex/organizations/${params.organizationId}/workitems/${params.workitemId}/effortRecords/${params.id}`;
      
      const response = await yunxiaoRequest(url, {
        method: "PUT",
        body: validatedParams
      });
    
      return response;
    }
  • Tool registration defining the name, description, and input schema (derived from UpdateEffortRecordSchema) for 'update_effort_record'.
    {
      name: "update_effort_record",
      description: "[Project Management] 更新登记实际工时",
      inputSchema: zodToJsonSchema(UpdateEffortRecordSchema),
    },
  • Zod schema definition for UpdateEffortRecord input validation, including fields like organizationId, workitemId, id, actualTime, etc.
    export const UpdateEffortRecordSchema = z.object({
      organizationId: z.string().describe("organizationId"),
      workitemId: z.string().describe("工作项唯一标识"),
      id: z.string().describe("工时记录唯一标识"),
      actualTime: z.number().positive().describe("实际工时"),
      description: z.string().max(500).optional().describe("工作描述"),
      gmtEnd: z.string().describe("工作开始结束日期"),
      gmtStart: z.string().describe("工作开始日期"),
      operatorId: z.string().optional().describe("操作者的useId,个人token时该参数无效"),
      workType: z.string().optional().describe("工作类型"),
    });

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