delete_sprint
Delete a sprint and move all open issues to the backlog. Note: this action is irreversible.
Instructions
Delete a sprint. Once deleted, all open issues in the sprint will be moved to the backlog. This action is irreversible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sprintId | Yes | ID of the sprint to delete. |
Implementation Reference
- src/tools/sprints.ts:270-282 (handler)The main handler logic for the delete_sprint tool. Validates args using the schema, calls jiraClient.deleteSprint(), and returns a success message.
case 'delete_sprint': { const validatedArgs = await deleteSprintSchema.validate(args); const _result = await jiraClient.deleteSprint(validatedArgs); return { content: [ { type: 'text', text: `Sprint ${validatedArgs.sprintId} deleted successfully. All open issues moved to backlog.`, }, ], }; } - src/tools/sprints.ts:89-102 (registration)Registration of the delete_sprint tool with its name, description, and input schema.
{ name: 'delete_sprint', description: 'Delete a sprint. Once deleted, all open issues in the sprint will be moved to the backlog. This action is irreversible.', inputSchema: { type: 'object', properties: { sprintId: { type: 'number', description: 'ID of the sprint to delete.', }, }, required: ['sprintId'], }, }, - src/jira-client.ts:493-502 (handler)The JiraClient method that calls the Jira API (agileClient.sprint.deleteSprint) to actually delete the sprint.
async deleteSprint(input: DeleteSprintInput) { try { const response = await this.agileClient.sprint.deleteSprint({ sprintId: input.sprintId, }); return response; } catch (error) { throw new Error(`Failed to delete sprint: ${error instanceof Error ? error.message : 'Unknown error'}`); } } - src/schemas/index.ts:214-216 (schema)Yup validation schema for delete_sprint: requires a sprintId (number).
export const deleteSprintSchema = yup.object({ sprintId: yup.number().required('Sprint ID is required'), }); - src/index.ts:101-106 (registration)Routes delete_sprint requests to handleSprintTool in the main server handler.
name.startsWith('delete_sprint') || name.startsWith('create_sprint') || name.startsWith('update_sprint') || name.startsWith('close_sprint') ) { return await handleSprintTool(name, args || {}, this.jiraClient);