Skip to main content
Glama

get_sprint_metrics

Retrieve progress metrics for GitHub project sprints to track completion and analyze performance, including optional issue details for comprehensive oversight.

Instructions

Get progress metrics for a specific sprint

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sprintIdYes
includeIssuesYes

Implementation Reference

  • Core handler function that implements get_sprint_metrics tool logic: fetches sprint data, retrieves associated issues, calculates completion metrics, days remaining, and active status.
    async getSprintMetrics(id: string, includeIssues: boolean = false): Promise<SprintMetrics> {
      try {
        const sprint = await this.sprintRepo.findById(id);
        if (!sprint) {
          throw new ResourceNotFoundError(ResourceType.SPRINT, id);
        }
    
        const issuePromises = sprint.issues.map((issueId: string) => this.issueRepo.findById(issueId));
        const issuesResult = await Promise.all(issuePromises);
        const issues = issuesResult.filter((issue: Issue | null) => issue !== null) as Issue[];
    
        const totalIssues = issues.length;
        const completedIssues = issues.filter(
          issue => issue.status === ResourceStatus.CLOSED || issue.status === ResourceStatus.COMPLETED
        ).length;
        const remainingIssues = totalIssues - completedIssues;
        const completionPercentage = totalIssues > 0 ? Math.round((completedIssues / totalIssues) * 100) : 0;
    
        const now = new Date();
        const endDate = new Date(sprint.endDate);
        const daysRemaining = Math.ceil((endDate.getTime() - now.getTime()) / (1000 * 60 * 60 * 24));
        const isActive = now >= new Date(sprint.startDate) && now <= endDate;
    
        return {
          id: sprint.id,
          title: sprint.title,
          startDate: sprint.startDate,
          endDate: sprint.endDate,
          totalIssues,
          completedIssues,
          remainingIssues,
          completionPercentage,
          status: sprint.status,
          issues: includeIssues ? issues : undefined,
          daysRemaining,
          isActive
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Zod schema and TypeScript type definition for get_sprint_metrics tool input parameters.
    // Schema for get_sprint_metrics tool
    export const getSprintMetricsSchema = z.object({
      sprintId: z.string().min(1, "Sprint ID is required"),
      includeIssues: z.boolean(),
    });
    
    export type GetSprintMetricsArgs = z.infer<typeof getSprintMetricsSchema>;
  • Registration of the getSprintMetricsTool in the central ToolRegistry during initialization.
    this.registerTool(getSprintMetricsTool);
  • MCP server dispatcher that routes tool calls for get_sprint_metrics to the ProjectManagementService implementation.
    case "get_sprint_metrics":
      return await this.service.getSprintMetrics(args.sprintId, args.includeIssues);
  • ToolDefinition export including name, description, schema reference, and usage examples for MCP tool discovery.
    export const getSprintMetricsTool: ToolDefinition<GetSprintMetricsArgs> = {
      name: "get_sprint_metrics",
      description: "Get progress metrics for a specific sprint",
      schema: getSprintMetricsSchema as unknown as ToolSchema<GetSprintMetricsArgs>,
      examples: [
        {
          name: "Get sprint progress",
          description: "Get progress metrics for sprint 'sprint_1'",
          args: {
            sprintId: "sprint_1",
            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 'Get progress metrics' which implies a read operation, but it doesn't cover aspects like authentication needs, rate limits, error handling, or what the output looks like (e.g., metrics format, whether it's paginated). This is a significant gap for a tool with zero annotation coverage.

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 that is front-loaded with the core purpose. There is no wasted text, and it's appropriately sized for a simple tool, making it highly concise and well-structured.

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 metrics tool with 2 parameters), no annotations, no output schema, and 0% schema coverage, the description is incomplete. It doesn't explain return values, parameter details, or behavioral traits, making it inadequate for effective tool selection and invocation by an AI agent.

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?

The input schema has 0% description coverage, so parameters 'sprintId' and 'includeIssues' are undocumented in the schema. The description adds no meaning beyond the tool's purpose; it doesn't explain what 'sprintId' should be (e.g., format, source) or what 'includeIssues' entails (e.g., whether it adds issue details to metrics). With low schema coverage, the description fails to compensate adequately.

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 sprint', making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'get_current_sprint' or 'get_milestone_metrics', which might also retrieve sprint-related data, so it lacks 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, context, or exclusions, such as how it differs from 'get_current_sprint' or other metrics tools in the sibling list, leaving usage unclear.

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