update_sprint
Update a Jira sprint's name, dates, goal, or state. Modify only specified fields; closed sprints accept only name and goal changes.
Instructions
Update sprint information (name, dates, goal, state). Only provided fields will be updated. For closed sprints, only name and goal can be updated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sprintId | Yes | ID of the sprint to update. | |
| name | No | New name for the sprint. | |
| startDate | No | New start date (ISO 8601 format). | |
| endDate | No | New end date (ISO 8601 format). | |
| goal | No | New goal or objective for the sprint. | |
| state | No | New state: "future" for upcoming, "active" to start, "closed" to complete. |
Implementation Reference
- src/tools/sprints.ts:304-316 (handler)The tool handler for 'update_sprint' in the switch statement. Validates args using updateSprintSchema, calls jiraClient.updateSprint(), and returns a success message.
case 'update_sprint': { const validatedArgs = await updateSprintSchema.validate(args); const _result = await jiraClient.updateSprint(validatedArgs); return { content: [ { type: 'text', text: `Sprint ${validatedArgs.sprintId} updated successfully`, }, ], }; } - src/schemas/index.ts:228-235 (schema)Yup validation schema for update_sprint input. Requires sprintId, and optionally accepts name, startDate, endDate, goal, and state.
export const updateSprintSchema = yup.object({ sprintId: yup.number().required('Sprint ID is required'), name: yup.string().optional(), startDate: yup.string().optional(), endDate: yup.string().optional(), goal: yup.string().optional(), state: yup.string().oneOf(['future', 'active', 'closed']).optional(), }); - src/schemas/index.ts:262-262 (schema)TypeScript type derived from the updateSprintSchema, used as input type for JiraClient.updateSprint().
export type UpdateSprintInput = yup.InferType<typeof updateSprintSchema>; - src/tools/sprints.ts:133-167 (registration)MCP tool registration for 'update_sprint' in the createSprintTools function, defining its description and input JSON schema.
{ name: 'update_sprint', description: 'Update sprint information (name, dates, goal, state). Only provided fields will be updated. For closed sprints, only name and goal can be updated.', inputSchema: { type: 'object', properties: { sprintId: { type: 'number', description: 'ID of the sprint to update.', }, name: { type: 'string', description: 'New name for the sprint.', }, startDate: { type: 'string', description: 'New start date (ISO 8601 format).', }, endDate: { type: 'string', description: 'New end date (ISO 8601 format).', }, goal: { type: 'string', description: 'New goal or objective for the sprint.', }, state: { type: 'string', enum: ['future', 'active', 'closed'], description: 'New state: "future" for upcoming, "active" to start, "closed" to complete.', }, }, required: ['sprintId'], }, },