Skip to main content
Glama

list_sprints

Retrieve all sprints from GitHub projects to track development progress and manage workflows based on status.

Instructions

List all sprints

Input Schema

NameRequiredDescriptionDefault
statusYes

Input Schema (JSON Schema)

{ "properties": { "status": { "type": "string" } }, "required": [ "status" ], "type": "object" }

Implementation Reference

  • Core handler function that fetches all sprints from the GitHubSprintRepository and filters them by the provided status ('planned', 'active', 'completed', or 'all'). Maps status strings to ResourceStatus enum and handles errors.
    async listSprints(status: string = 'all'): Promise<Sprint[]> { try { const sprints = await this.sprintRepo.findAll(); // Filter by status if needed if (status !== 'all') { let resourceStatus; switch(status) { case 'planned': resourceStatus = ResourceStatus.PLANNED; break; case 'active': resourceStatus = ResourceStatus.ACTIVE; break; case 'completed': resourceStatus = ResourceStatus.COMPLETED; break; default: return sprints; } return sprints.filter(sprint => sprint.status === resourceStatus); } return sprints; } catch (error) { throw this.mapErrorToMCPError(error); } }
  • Zod schema definition for list_sprints tool input, validating optional 'status' parameter with enum values.
    // Schema for list_sprints tool export const listSprintsSchema = z.object({ status: z.enum(["planned", "active", "completed", "all"]).default("all"), }); export type ListSprintsArgs = z.infer<typeof listSprintsSchema>;
  • ToolDefinition for list_sprints including name, description, schema reference, and usage examples.
    export const listSprintsTool: ToolDefinition<ListSprintsArgs> = { name: "list_sprints", description: "List all sprints", schema: listSprintsSchema as unknown as ToolSchema<ListSprintsArgs>, examples: [ { name: "List active sprints", description: "List all currently active sprints", args: { status: "active" } } ] };
  • Registers the listSprintsTool in the central ToolRegistry singleton instance.
    this.registerTool(listSprintsTool);
  • MCP tool dispatcher switch case that routes list_sprints calls to ProjectManagementService.listSprints.
    case "list_sprints": return await this.service.listSprints(args.status);

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