Skip to main content
Glama

get_upcoming_milestones

Retrieve upcoming GitHub milestones within a specified timeframe to track project deadlines and progress.

Instructions

Get a list of upcoming milestones within a time frame

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysAheadYes
limitYes
includeIssuesYes

Implementation Reference

  • Core handler implementation: Fetches all milestones, filters those due within 'daysAhead' that are still open, sorts by due date ascending, limits to 'limit' results, and enriches each with metrics (including optional issues). Calls getMilestoneMetrics helper.
    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);
      }
    }
  • MCP tool dispatcher in server index: Routes 'get_upcoming_milestones' tool calls to ProjectManagementService.getUpcomingMilestones with validated args.
    case "get_upcoming_milestones":
      return await this.service.getUpcomingMilestones(args.daysAhead, args.limit, args.includeIssues);
  • Zod input schema validation for tool parameters: daysAhead (positive int), limit (positive int), includeIssues (boolean). Exports TypeScript type.
    // Schema for get_upcoming_milestones tool
    export const getUpcomingMilestonesSchema = z.object({
      daysAhead: z.number().int().positive(),
      limit: z.number().int().positive(),
      includeIssues: z.boolean(),
    });
    
    export type GetUpcomingMilestonesArgs = z.infer<typeof getUpcomingMilestonesSchema>;
  • Registers the getUpcomingMilestonesTool in the central ToolRegistry singleton during built-in tools initialization.
    this.registerTool(getUpcomingMilestonesTool);
  • ToolDefinition export including name, description, schema reference, and example usage for MCP tool listing.
    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,
          },
        },
      ],
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but doesn't cover critical aspects like whether this is a read-only operation, potential rate limits, authentication needs, or what the output format looks like. This is a significant gap for a tool with parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It is front-loaded with the core purpose, making it easy to scan and understand quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (3 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain return values, error conditions, or behavioral traits, leaving the agent with insufficient information to use the tool effectively beyond basic invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate by explaining parameters. It mentions 'within a time frame', which loosely relates to 'daysAhead', but doesn't clarify the meaning of 'limit' or 'includeIssues'. This adds minimal value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('upcoming milestones'), specifying the scope ('within a time frame'). It distinguishes from siblings like 'list_milestones' by focusing on upcoming items, though it doesn't explicitly mention how it differs from 'get_overdue_milestones' or 'get_milestone_metrics'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as 'list_milestones' or 'get_overdue_milestones'. The description implies usage for time-based queries but lacks explicit context, prerequisites, or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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/HarshKumarSharma/MCP'

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