create_sprint
Create a new sprint in Alibaba Cloud DevOps projects to organize work items, assign owners, set timelines, and manage development cycles for efficient project delivery.
Instructions
[Project Management] Create a new sprint
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organizationId | Yes | Organization ID | |
| projectId | Yes | Project unique identifier | |
| name | Yes | Sprint name | |
| owners | Yes | Sprint owner user IDs | |
| startDate | No | Date string in YYYY-MM-DD format | |
| endDate | No | Date string in YYYY-MM-DD format | |
| description | No | Sprint description | |
| capacityHours | No | Sprint capacity hours |
Implementation Reference
- Tool handler switch case that parses input, calls createSprintFunc, and returns JSON response.case "create_sprint": { const args = types.CreateSprintSchema.parse(request.params.arguments); const sprintResult = await sprint.createSprintFunc( args.organizationId, args.projectId, args.name, args.owners, args.startDate, args.endDate, args.description, args.capacityHours ); return { content: [{ type: "text", text: JSON.stringify(sprintResult, null, 2) }], }; }
- operations/projex/types.ts:110-119 (schema)Zod schema defining input parameters for create_sprint tool.export const CreateSprintSchema = z.object({ organizationId: z.string().describe("Organization ID"), projectId: z.string().describe("Project unique identifier"), name: z.string().describe("Sprint name"), owners: z.array(z.string()).describe("Sprint owner user IDs"), startDate: z.string().optional().describe("Date string in YYYY-MM-DD format"), endDate: z.string().optional().describe("Date string in YYYY-MM-DD format"), description: z.string().optional().describe("Sprint description"), capacityHours: z.number().int().optional().describe("Sprint capacity hours"), });
- tool-registry/project-management.ts:29-33 (registration)Tool registration including name, description, and input schema reference.{ name: "create_sprint", description: "[Project Management] Create a new sprint", inputSchema: zodToJsonSchema(types.CreateSprintSchema), },
- operations/projex/sprint.ts:62-106 (helper)Core function that makes the API request to create a sprint via Yunxiao API.export async function createSprintFunc( organizationId: string, projectId: string, name: string, owners: string[], startDate?: string, endDate?: string, description?: string, capacityHours?: number, operatorId?: string ): Promise<{ id: string }> { const url = `/oapi/v1/projex/organizations/${organizationId}/projects/${projectId}/sprints`; const requestBody: Record<string, any> = { name, owners, }; if (startDate !== undefined) { requestBody.startDate = startDate; } if (endDate !== undefined) { requestBody.endDate = endDate; } if (description !== undefined) { requestBody.description = description; } if (capacityHours !== undefined) { requestBody.capacityHours = capacityHours; } if (operatorId !== undefined) { requestBody.operatorId = operatorId; } const response = await yunxiaoRequest(url, { method: "POST", body: requestBody, }); return CreateSprintResponseSchema.parse(response); }