Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

get_milestone_metrics

Retrieve progress metrics for GitHub project milestones to track completion status and issue details for project management.

Instructions

Get progress metrics for a specific milestone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
milestoneIdYes
includeIssuesYes

Implementation Reference

  • Core implementation of getMilestoneMetrics: fetches milestone, filters associated issues, calculates metrics like completion percentage, open/closed counts, overdue status, and optionally includes issue details.
    // Milestone Management
    async getMilestoneMetrics(id: string, includeIssues: boolean = false): Promise<MilestoneMetrics> {
      try {
        const milestone = await this.milestoneRepo.findById(id);
        if (!milestone) {
          throw new ResourceNotFoundError(ResourceType.MILESTONE, id);
        }
    
        const allIssues = await this.issueRepo.findAll();
        const issues = allIssues.filter(issue => issue.milestoneId === milestone.id);
    
        const totalIssues = issues.length;
        const closedIssues = issues.filter(
          issue => issue.status === ResourceStatus.CLOSED || issue.status === ResourceStatus.COMPLETED
        ).length;
        const openIssues = totalIssues - closedIssues;
        const completionPercentage = totalIssues > 0 ? Math.round((closedIssues / totalIssues) * 100) : 0;
    
        const now = new Date();
        let isOverdue = false;
        let daysRemaining: number | undefined = undefined;
    
        if (milestone.dueDate) {
          const dueDate = new Date(milestone.dueDate);
          isOverdue = now > dueDate;
          daysRemaining = Math.ceil((dueDate.getTime() - now.getTime()) / (1000 * 60 * 60 * 24));
        }
    
        return {
          id: milestone.id,
          title: milestone.title,
          dueDate: milestone.dueDate,
          openIssues,
          closedIssues,
          totalIssues,
          completionPercentage,
          status: milestone.status,
          issues: includeIssues ? issues : undefined,
          isOverdue,
          daysRemaining: daysRemaining && daysRemaining > 0 ? daysRemaining : undefined
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
  • MCP tool dispatcher handler that routes 'get_milestone_metrics' calls to ProjectManagementService.getMilestoneMetrics
    case "get_milestone_metrics":
      return await this.service.getMilestoneMetrics(args.milestoneId, args.includeIssues);
  • ToolDefinition for get_milestone_metrics including Zod input schema, description, and usage examples
    export const getMilestoneMetricsTool: ToolDefinition<GetMilestoneMetricsArgs> = {
      name: "get_milestone_metrics",
      description: "Get progress metrics for a specific milestone",
      schema: getMilestoneMetricsSchema as unknown as ToolSchema<GetMilestoneMetricsArgs>,
      examples: [
        {
          name: "Get milestone progress",
          description: "Get progress metrics for milestone #2",
          args: {
            milestoneId: "2",
            includeIssues: true,
          },
        },
      ],
    };
  • Zod input validation schema for get_milestone_metrics tool parameters
    export const getMilestoneMetricsSchema = z.object({
      milestoneId: z.string().min(1, "Milestone ID is required"),
      includeIssues: z.boolean(),
    });
    
    export type GetMilestoneMetricsArgs = z.infer<typeof getMilestoneMetricsSchema>;
  • Registers the getMilestoneMetricsTool in the central ToolRegistry singleton
    this.registerTool(getMilestoneMetricsTool);
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states 'Get progress metrics' which implies a read-only operation, but doesn't disclose behavioral traits like authentication needs, rate limits, error conditions, or what 'progress metrics' entails (e.g., completion percentage, issue counts). For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 zero waste—'Get progress metrics for a specific milestone' is front-loaded and directly conveys the core action. It's appropriately sized for a simple tool, though conciseness alone doesn't make up for lack of detail.

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 (a read operation with 2 required parameters), no annotations, no output schema, and 0% schema coverage, the description is incomplete. It doesn't explain what 'progress metrics' returns (e.g., numerical data, structured object), how to interpret results, or handle errors. For a tool that likely outputs meaningful data, this leaves the agent guessing about the response format and usage context.

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%, meaning parameters 'milestoneId' and 'includeIssues' are undocumented in the schema. The description adds no meaning beyond the parameter names—it doesn't explain what 'milestoneId' should be (e.g., format, source), what 'includeIssues' does (e.g., adds issue details to metrics), or any constraints. With low coverage, the description fails to compensate, leaving parameters unclear.

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 the resource 'progress metrics for a specific milestone', making the purpose understandable. It distinguishes from siblings like 'get_milestones' (list) or 'get_sprint_metrics' (different scope), but doesn't explicitly differentiate from 'get_overdue_milestones' or 'get_upcoming_milestones', which might also involve metrics. The specificity is good but not perfect for sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid milestone ID), exclusions, or comparisons to other tools like 'get_sprint_metrics' or general metric tools. Usage is implied by the name and purpose, but explicit context is missing.

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

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