get_current_sprint
Retrieve the active sprint from GitHub Projects to track current progress and manage workflow tasks efficiently.
Instructions
Get the currently active sprint
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeIssues | Yes |
Implementation Reference
- Implements the core logic to find and return the currently active sprint, optionally including associated issues by calling the sprint repository.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); } }
- Defines the tool schema, input validation (includeIssues boolean), description, and usage examples.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:236-236 (registration)Registers the getCurrentSprintTool in the central ToolRegistry singleton.this.registerTool(getCurrentSprintTool);
- src/index.ts:371-372 (handler)Main MCP tool dispatch handler that routes 'get_current_sprint' calls to the ProjectManagementService.case "get_current_sprint": return await this.service.getCurrentSprint(args.includeIssues);
- Zod schema definition for tool input parameters.export const getCurrentSprintSchema = z.object({ includeIssues: z.boolean().default(true), }); export type GetCurrentSprintArgs = z.infer<typeof getCurrentSprintSchema>;