remove_issues_from_sprint
Remove specific issues from a GitHub sprint to manage project scope and prioritize tasks effectively.
Instructions
Remove issues from a sprint
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sprintId | Yes | ||
| issueIds | Yes |
Input Schema (JSON Schema)
{
"properties": {
"issueIds": {
"items": {
"type": "string"
},
"type": "array"
},
"sprintId": {
"type": "string"
}
},
"required": [
"sprintId",
"issueIds"
],
"type": "object"
}
Implementation Reference
- Core handler function that implements the remove_issues_from_sprint tool logic. Iterates through issueIds and calls the SprintRepository to remove each issue from the sprint, handling errors per issue and returning aggregate success statistics.async removeIssuesFromSprint(data: { sprintId: string; issueIds: string[]; }): Promise<{ success: boolean; removedIssues: number; message: string }> { try { let removedCount = 0; const issues = []; // Remove each issue from the sprint for (const issueId of data.issueIds) { try { await this.sprintRepo.removeIssue(data.sprintId, issueId); removedCount++; issues.push(issueId); } catch (error) { process.stderr.write(`Failed to remove issue ${issueId} from sprint: ${error}`); } } return { success: removedCount > 0, removedIssues: removedCount, message: `Removed ${removedCount} issue(s) from sprint ${data.sprintId}` }; } catch (error) { throw this.mapErrorToMCPError(error); } }
- Zod schema definition for validating input arguments to the remove_issues_from_sprint tool: requires sprintId (string) and issueIds (non-empty array of strings).// Schema for remove_issues_from_sprint tool export const removeIssuesFromSprintSchema = z.object({ sprintId: z.string().min(1, "Sprint ID is required"), issueIds: z.array(z.string()).min(1, "At least one issue ID is required"), }); export type RemoveIssuesFromSprintArgs = z.infer<typeof removeIssuesFromSprintSchema>;
- src/infrastructure/tools/ToolRegistry.ts:166-166 (registration)Registers the removeIssuesFromSprintTool in the central ToolRegistry singleton instance.this.registerTool(removeIssuesFromSprintTool);
- src/infrastructure/tools/ToolRegistry.ts:51-51 (registration)Imports the removeIssuesFromSprintTool definition for use in ToolRegistry.removeIssuesFromSprintTool,
- src/index.ts:310-311 (handler)MCP server dispatcher that routes 'remove_issues_from_sprint' tool calls to the ProjectManagementService handler.case "remove_issues_from_sprint": return await this.service.removeIssuesFromSprint(args);