Skip to main content
Glama
aliyun

AlibabaCloud DevOps MCP Server

Official
by aliyun

create_effort_record

Log actual work hours for project tasks in Alibaba Cloud DevOps to track time spent on specific work items with start/end dates and descriptions.

Instructions

[Project Management] 登记实际工时

Input Schema

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

Implementation Reference

  • MCP tool handler switch case for 'create_effort_record': validates input using CreateEffortRecordSchema and calls effort.createEffortRecord from operations/projex/effort.ts
    case "create_effort_record": { const args = types.CreateEffortRecordSchema.parse(request.params.arguments); const result = await effort.createEffortRecord({ id: args.id, organizationId: args.organizationId, actualTime: args.actualTime, description: args.description, gmtEnd: args.gmtEnd, gmtStart: args.gmtStart, operatorId: args.operatorId, workType: args.workType }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
  • Registration of the 'create_effort_record' tool in getEffortTools array, specifying name, description, and input schema
    { name: "create_effort_record", description: "[Project Management] 登记实际工时", inputSchema: zodToJsonSchema(CreateEffortRecordSchema), },
  • Core helper function implementing createEffortRecord: API POST to create effort record via yunxiaoRequest, using CreateEffortRecordRequestSchema
    export async function createEffortRecord( params: z.infer<typeof CreateEffortRecordRequestSchema> & { id: string; organizationId: 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.id}/effortRecords`; const response = await yunxiaoRequest(url, { method: "POST", body: validatedParams }); return IdentifierDTOSchema.parse(response); }
  • Input schema CreateEffortRecordSchema: Zod object used for tool argument validation in handler and registration
    export const CreateEffortRecordSchema = z.object({ id: z.string().describe("工作项唯一标识"), organizationId: z.string().describe("organizationId"), 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("工作类型"), });
  • Internal API request schema CreateEffortRecordRequestSchema: Zod object used for validating body in createEffortRecord helper
    export const CreateEffortRecordRequestSchema = z.object({ 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