list_effort_records
Retrieve detailed actual effort records for work items to track time spent on tasks in Alibaba Cloud DevOps projects.
Instructions
[Project Management] 获取实际工时明细
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | 工作项唯一标识 | |
| organizationId | Yes | organizationId |
Implementation Reference
- tool-handlers/effort.ts:18-27 (handler)MCP tool handler switch case that parses input arguments using ListEffortRecordsSchema, calls the listEffortRecords helper function, and returns the effort records as a JSON-formatted text response.case "list_effort_records": { const args = types.ListEffortRecordsSchema.parse(request.params.arguments); const effortRecords = await effort.listEffortRecords({ id: args.id, organizationId: args.organizationId }); return { content: [{ type: "text", text: JSON.stringify(effortRecords, null, 2) }], }; }
- tool-registry/effort.ts:18-22 (registration)Tool registration in the getEffortTools array, defining the tool name, description, and input schema derived from ListEffortRecordsSchema.{ name: "list_effort_records", description: "[Project Management] 获取实际工时明细", inputSchema: zodToJsonSchema(ListEffortRecordsSchema), },
- operations/projex/effort.ts:36-48 (helper)Helper function implementing the core logic: validates parameters, constructs API URL for fetching effort records of a specific workitem, performs GET request using yunxiaoRequest, and parses response as array of EffortRecordSchema.export async function listEffortRecords( params: z.infer<typeof ListEffortRecordsSchema> ) { const validatedParams = ListEffortRecordsSchema.parse(params); const url = `/oapi/v1/projex/organizations/${validatedParams.organizationId}/workitems/${validatedParams.id}/effortRecords`; const response = await yunxiaoRequest(url, { method: "GET" }); return z.array(EffortRecordSchema).parse(response); }
- operations/projex/types.ts:517-520 (schema)Zod schema definition for input parameters: workitem ID and organization ID.export const ListEffortRecordsSchema = z.object({ id: z.string().describe("工作项唯一标识"), organizationId: z.string().describe("organizationId"), });