create_sprint
Create a sprint in Jira by providing a name and origin board ID; optionally include start date, end date, or goal.
Instructions
Create a new sprint. Sprint name and origin board ID are required. Start date, end date, and goal are optional.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the sprint to create. | |
| originBoardId | Yes | ID of the board where the sprint will be created. | |
| startDate | No | Start date of the sprint (ISO 8601 format). | |
| endDate | No | End date of the sprint (ISO 8601 format). | |
| goal | No | Goal or objective of the sprint. |
Implementation Reference
- src/tools/sprints.ts:283-303 (handler)The handler function for the 'create_sprint' tool. Validates args using createSprintSchema, calls jiraClient.createSprint(), and returns essential sprint fields (id, name, state, goal).
case 'create_sprint': { const validatedArgs = await createSprintSchema.validate(args); const result = await jiraClient.createSprint(validatedArgs); // Extract only essential fields const essentialSprint = { id: result.id, name: result.name, state: result.state, goal: result.goal }; return { content: [ { type: 'text', text: JSON.stringify(essentialSprint, null, 2), }, ], }; } - src/tools/sprints.ts:103-132 (registration)Tool registration for 'create_sprint' in createSprintTools(). Defines name, description, and inputSchema with required fields (name, originBoardId) and optional fields (startDate, endDate, goal).
{ name: 'create_sprint', description: 'Create a new sprint. Sprint name and origin board ID are required. Start date, end date, and goal are optional.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Name of the sprint to create.', }, originBoardId: { type: 'number', description: 'ID of the board where the sprint will be created.', }, startDate: { type: 'string', description: 'Start date of the sprint (ISO 8601 format).', }, endDate: { type: 'string', description: 'End date of the sprint (ISO 8601 format).', }, goal: { type: 'string', description: 'Goal or objective of the sprint.', }, }, required: ['name', 'originBoardId'], }, }, - src/schemas/index.ts:219-225 (schema)Yup validation schema for create_sprint. Requires 'name' and 'originBoardId', with optional 'startDate', 'endDate', and 'goal' strings.
export const createSprintSchema = yup.object({ name: yup.string().required('Sprint name is required'), originBoardId: yup.number().required('Origin board ID is required'), startDate: yup.string().optional(), endDate: yup.string().optional(), goal: yup.string().optional(), });