get_current_sprint
Retrieve the currently active sprint in a GitHub project, including its associated issues if specified. Useful for tracking progress and managing tasks in active sprints.
Instructions
Get the currently active sprint
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeIssues | Yes |
Implementation Reference
- Primary handler implementation for get_current_sprint. Fetches the current sprint using GitHubSprintRepository.findCurrent() and optionally loads detailed issue information.async getCurrentSprint(includeIssues: boolean = true): Promise<Sprint | null> { try { const currentSprint = await this.sprintRepo.findCurrent(); if (!currentSprint) { return null; } if (includeIssues) { // Add issues data to sprint const issues = await this.sprintRepo.getIssues(currentSprint.id); // We can't modify the sprint directly, so we create a new object return { ...currentSprint, // We're adding this property outside the type definition for convenience // in the response; it won't affect the actual sprint object issueDetails: issues } as Sprint & { issueDetails?: Issue[] }; } return currentSprint; } catch (error) { throw this.mapErrorToMCPError(error); } }
- src/index.ts:371-372 (handler)MCP server dispatch handler that routes 'get_current_sprint' tool calls to ProjectManagementService.getCurrentSprint().case "get_current_sprint": return await this.service.getCurrentSprint(args.includeIssues);
- Tool schema definition including Zod input validation schema (includeIssues: boolean) and examples for the get_current_sprint tool.export const getCurrentSprintTool: ToolDefinition<GetCurrentSprintArgs> = { name: "get_current_sprint", description: "Get the currently active sprint", schema: getCurrentSprintSchema as unknown as ToolSchema<GetCurrentSprintArgs>, examples: [ { name: "Get current sprint with issues", description: "Get details of the current sprint including assigned issues", args: { includeIssues: true } } ] };
- src/infrastructure/tools/ToolRegistry.ts:234-239 (registration)Tool registration in the central ToolRegistry singleton during initialization of built-in sprint management tools.this.registerTool(createSprintTool); this.registerTool(listSprintsTool); this.registerTool(getCurrentSprintTool); this.registerTool(updateSprintTool); this.registerTool(addIssuesToSprintTool); this.registerTool(removeIssuesFromSprintTool);