Skip to main content
Glama

get_upcoming_milestones

Retrieve upcoming GitHub project milestones within a specified timeframe to track deadlines and plan sprints effectively.

Instructions

Get a list of upcoming milestones within a time frame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysAheadYes
limitYes
includeIssuesYes

Implementation Reference

  • The core handler function that implements get_upcoming_milestones tool logic. Fetches all milestones, filters upcoming ones within daysAhead that are not completed/closed, sorts by due date, limits results, and computes metrics (including optional issues) for each.
    async getUpcomingMilestones(daysAhead: number = 30, limit: number = 10, includeIssues: boolean = false): Promise<MilestoneMetrics[]> { try { const milestones = await this.milestoneRepo.findAll(); const now = new Date(); const futureDate = new Date(now); futureDate.setDate(now.getDate() + daysAhead); const upcomingMilestones = milestones.filter(milestone => { if (!milestone.dueDate) return false; const dueDate = new Date(milestone.dueDate); return dueDate > now && dueDate <= futureDate && milestone.status !== ResourceStatus.COMPLETED && milestone.status !== ResourceStatus.CLOSED; }); upcomingMilestones.sort((a, b) => { if (!a.dueDate || !b.dueDate) return 0; return new Date(a.dueDate).getTime() - new Date(b.dueDate).getTime(); }); const limitedMilestones = upcomingMilestones.slice(0, limit); const milestoneMetrics = await Promise.all( limitedMilestones.map(milestone => this.getMilestoneMetrics(milestone.id, includeIssues) ) ); return milestoneMetrics; } catch (error) { throw this.mapErrorToMCPError(error); } }
  • ToolDefinition for get_upcoming_milestones including Zod input schema (daysAhead: positive int, limit: positive int, includeIssues: boolean), description, and usage examples. Schema defined lines 80-87.
    export const getUpcomingMilestonesTool: ToolDefinition<GetUpcomingMilestonesArgs> = { name: "get_upcoming_milestones", description: "Get a list of upcoming milestones within a time frame", schema: getUpcomingMilestonesSchema as unknown as ToolSchema<GetUpcomingMilestonesArgs>, examples: [ { name: "List upcoming milestones", description: "Get milestones due in the next 14 days", args: { daysAhead: 14, limit: 10, includeIssues: true, }, }, ], };
  • Registers the getUpcomingMilestonesTool in the central ToolRegistry during built-in tools initialization (imported line 9).
    this.registerTool(getUpcomingMilestonesTool);
  • MCP server dispatch handler in executeToolHandler switch statement that routes validated tool calls to the ProjectManagementService implementation.
    case "get_upcoming_milestones": return await this.service.getUpcomingMilestones(args.daysAhead, args.limit, args.includeIssues);

Other Tools

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/kunwarVivek/mcp-github-project-manager'

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