create_sprint
Initiate a new development sprint by defining title, description, start and end dates, and associated issue IDs for efficient project management in GitHub Projects V2.
Instructions
Create a new development sprint
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| endDate | Yes | ||
| issueIds | Yes | ||
| startDate | Yes | ||
| title | Yes |
Implementation Reference
- Main handler implementation for create_sprint tool. Constructs Sprint data and calls GitHubSprintRepository.create to persist the sprint.async createSprint(data: { title: string; description: string; startDate: string; endDate: string; issueIds?: string[]; }): Promise<Sprint> { try { // Create data object that matches the expected type const sprintData: Omit<Sprint, "id" | "createdAt" | "updatedAt"> = { title: data.title, description: data.description, startDate: data.startDate, endDate: data.endDate, status: ResourceStatus.PLANNED, issues: data.issueIds?.map(id => id.toString()) || [] }; return await this.sprintRepo.create(sprintData); } catch (error) { throw this.mapErrorToMCPError(error); } }
- Zod schema definition and ToolDefinition for create_sprint including input validation, description, and usage examples.export const createSprintTool: ToolDefinition<CreateSprintArgs> = { name: "create_sprint", description: "Create a new development sprint", schema: createSprintSchema as unknown as ToolSchema<CreateSprintArgs>, examples: [ { name: "Create two-week sprint", description: "Create a two-week sprint with initial issues", args: { title: "Sprint 1: User Authentication", description: "First sprint focused on user authentication features", startDate: "2025-06-01T00:00:00Z", endDate: "2025-06-15T00:00:00Z", issueIds: ["101", "102", "103"] } } ] };
- src/infrastructure/tools/ToolRegistry.ts:233-240 (registration)Registers the createSprintTool (and related sprint tools) in the central ToolRegistry singleton.// Register sprint tools this.registerTool(createSprintTool); this.registerTool(listSprintsTool); this.registerTool(getCurrentSprintTool); this.registerTool(updateSprintTool); this.registerTool(addIssuesToSprintTool); this.registerTool(removeIssuesFromSprintTool);
- src/index.ts:365-366 (handler)MCP tool dispatch handler that routes 'create_sprint' calls to ProjectManagementService.createSprint after validation.case "create_sprint": return await this.service.createSprint(args);
- src/domain/types.ts:112-120 (schema)Domain type definition for CreateSprint input used by the service and repository layers.export interface CreateSprint { title: string; description: string; startDate: string; endDate: string; status?: ResourceStatus; issues?: IssueId[]; goals?: string[]; }