Skip to main content
Glama

update_sprint

Modify sprint details including title, description, dates, and status to track development progress in GitHub projects.

Instructions

Update a development sprint

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sprintIdYes
titleNo
descriptionNo
startDateNo
endDateNo
statusNo

Implementation Reference

  • Main handler function for update_sprint tool. Maps tool arguments to domain model, handles status enum conversion, cleans undefined fields, 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);
      }
    }
  • Zod schema definition for update_sprint tool input validation
    // Schema for update_sprint tool
    export 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>;
  • Registration of update_sprint tool (as updateSprintTool) in the central ToolRegistry
    this.registerTool(createSprintTool);
    this.registerTool(listSprintsTool);
    this.registerTool(getCurrentSprintTool);
    this.registerTool(updateSprintTool);
    this.registerTool(addIssuesToSprintTool);
    this.registerTool(removeIssuesFromSprintTool);
  • src/index.ts:304-305 (registration)
    Dispatch handler in main MCP server that routes update_sprint calls to ProjectManagementService.updateSprint
    case "update_sprint":
      return await this.service.updateSprint(args);
  • ToolDefinition export for update_sprint including name, description, schema reference, and usage examples
    export 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"
          }
        }
      ]
    };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HarshKumarSharma/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server