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
| Name | Required | Description | Default |
|---|---|---|---|
| organizationId | Yes | organizationId | |
| workitemId | Yes | 工作项唯一标识 | |
| id | Yes | 预计工时记录唯一标识 | |
| description | No | 工作描述 | |
| operatorId | No | 操作者的useId,个人token时该参数无效 | |
| owner | Yes | 负责人,填userId | |
| spentTime | Yes | 预计工时 | |
| workType | No | 工作类别 |
Implementation Reference
- tool-handlers/effort.ts:91-106 (handler)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" }], }; }
- operations/projex/types.ts:560-569 (schema)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("工作类别"), });
- tool-registry/effort.ts:43-47 (registration)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), }
- operations/projex/effort.ts:144-167 (helper)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; }