update_sprint
Modify a development sprint by updating details such as title, description, start date, end date, and status within the MCP GitHub Project Manager server. Ensures sprint data stays aligned with project timelines and workflows.
Instructions
Update a development sprint
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | ||
| endDate | No | ||
| sprintId | Yes | ||
| startDate | No | ||
| status | No | ||
| title | No |
Implementation Reference
- Main handler method in ProjectManagementService that processes update_sprint tool calls. Validates input, maps to domain model, and delegates to GitHubSprintRepository.update()async updateSprint(data: { sprintId: string; title?: string; description?: string; startDate?: string; endDate?: string; status?: 'planned' | 'active' | 'completed'; issues?: string[]; }): Promise<Sprint> { try { // Convert status string to ResourceStatus enum if provided let resourceStatus: ResourceStatus | undefined; if (data.status) { switch (data.status) { case 'planned': resourceStatus = ResourceStatus.PLANNED; break; case 'active': resourceStatus = ResourceStatus.ACTIVE; break; case 'completed': resourceStatus = ResourceStatus.CLOSED; break; } } // Map input data to domain model const sprintData: Partial<Sprint> = { title: data.title, description: data.description, startDate: data.startDate, endDate: data.endDate, status: resourceStatus, issues: data.issues }; // Clean up undefined values Object.keys(sprintData).forEach(key => { if (sprintData[key as keyof Partial<Sprint>] === undefined) { delete sprintData[key as keyof Partial<Sprint>]; } }); return await this.sprintRepo.update(data.sprintId, sprintData); } catch (error) { throw this.mapErrorToMCPError(error); } }
- src/infrastructure/tools/ToolRegistry.ts:237-237 (registration)Registration of the updateSprintTool in the central ToolRegistry singletonthis.registerTool(updateSprintTool);
- Tool definition including name, description, input schema (updateSprintSchema), and examples for update_sprintexport const updateSprintTool: ToolDefinition<UpdateSprintArgs> = { name: "update_sprint", description: "Update a development sprint", schema: updateSprintSchema as unknown as ToolSchema<UpdateSprintArgs>, examples: [ { name: "Update sprint dates", description: "Update sprint dates and status", args: { sprintId: "sprint_1", startDate: "2025-07-01T00:00:00Z", endDate: "2025-07-15T00:00:00Z", status: "active" } } ] };
- Zod input validation schema for update_sprint tool parametersexport const updateSprintSchema = z.object({ sprintId: z.string().min(1, "Sprint ID is required"), title: z.string().optional(), description: z.string().optional(), startDate: z.string().datetime().optional(), endDate: z.string().datetime().optional(), status: z.enum(["planned", "active", "completed"]).optional(), }); export type UpdateSprintArgs = z.infer<typeof updateSprintSchema>;
- src/index.ts:374-375 (handler)MCP server dispatch handler that routes update_sprint tool calls to ProjectManagementService.updateSprintcase "update_sprint": return await this.service.updateSprint(args);