create_estimated_effort
Register estimated work hours for Alibaba Cloud DevOps project tasks to track time allocation and improve project planning accuracy.
Instructions
[Project Management] 登记预计工时
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | 工作项唯一标识 | |
| organizationId | Yes | organizationId | |
| description | No | 工作描述 | |
| operatorId | No | 操作者的useId,个人token时该参数无效 | |
| owner | Yes | 负责人,填userId | |
| spentTime | Yes | 预计工时 | |
| workType | No | 工作类别 |
Implementation Reference
- tool-handlers/effort.ts:57-71 (handler)MCP tool handler case for 'create_estimated_effort': parses input with CreateEstimatedEffortSchema and delegates to effort.createEstimatedEffortcase "create_estimated_effort": { const args = types.CreateEstimatedEffortSchema.parse(request.params.arguments); const result = await effort.createEstimatedEffort({ id: args.id, organizationId: args.organizationId, description: args.description, operatorId: args.operatorId, owner: args.owner, spentTime: args.spentTime, workType: args.workType }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
- tool-registry/effort.ts:33-37 (registration)Registration of the 'create_estimated_effort' tool in the getEffortTools array, including name, description, and zodToJsonSchema input schema.{ name: "create_estimated_effort", description: "[Project Management] 登记预计工时", inputSchema: zodToJsonSchema(CreateEstimatedEffortSchema), },
- operations/projex/effort.ts:92-114 (helper)Business logic implementation: validates parameters with CreateEstimatedEffortRequestSchema, constructs API URL, and performs POST request to create estimated effort record.export async function createEstimatedEffort( params: z.infer<typeof CreateEstimatedEffortRequestSchema> & { id: string; organizationId: 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.id}/estimatedEfforts`; const response = await yunxiaoRequest(url, { method: "POST", body: validatedParams }); return IdentifierDTOSchema.parse(response); }
- operations/projex/types.ts:538-546 (schema)Zod schema defining the input parameters for the create_estimated_effort tool (re-exported via common/types.ts).export const CreateEstimatedEffortSchema = z.object({ id: z.string().describe("工作项唯一标识"), organizationId: z.string().describe("organizationId"), 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("工作类别"), });