get_current_sprint
Retrieve the active sprint details from GitHub projects to track current development progress and manage project timelines effectively.
Instructions
Get the currently active sprint
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"includeIssues": "<includeIssues>"
},
"name": "get_current_sprint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeIssues | Yes |
Implementation Reference
- Main handler function that implements the core logic: finds the currently active sprint using sprintRepo.findCurrent() and optionally fetches and attaches issue details.
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:301-302 (handler)Tool dispatch handler in the main MCP server switch statement that receives validated args and delegates to ProjectManagementService.getCurrentSprint()
case "get_current_sprint": return await this.service.getCurrentSprint(args.includeIssues); - Zod schema defining the tool input parameters: optional boolean includeIssues (defaults to true)
// Schema for get_current_sprint tool export const getCurrentSprintSchema = z.object({ includeIssues: z.boolean().default(true), }); export type GetCurrentSprintArgs = z.infer<typeof getCurrentSprintSchema>; - src/infrastructure/tools/ToolRegistry.ts:163-163 (registration)Registers the getCurrentSprintTool in the central ToolRegistry for MCP tool listing
this.registerTool(getCurrentSprintTool); - src/infrastructure/tools/ToolSchemas.ts:432-445 (registration)ToolDefinition object defining name, description, schema reference, and usage examples for MCP tool discovery.
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 } } ] };