Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

list_milestones

Retrieve and filter milestones from GitHub projects to track progress and manage project timelines effectively.

Instructions

List milestones

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
sortNo
directionNo

Implementation Reference

  • Top-level MCP tool handler that dispatches 'list_milestones' calls to ProjectManagementService.listMilestones with parsed arguments.
    case "list_milestones":
      return await this.service.listMilestones(args.status, args.sort, args.direction);
  • Core handler function in ProjectManagementService that fetches all milestones from repository, applies status filter, sorts by specified criteria (due_date, title, created_at), and returns the list.
    async listMilestones(
      status: string = 'open',
      sort: string = 'created_at',
      direction: string = 'asc'
    ): Promise<Milestone[]> {
      try {
        // Get all milestones
        const milestones = await this.milestoneRepo.findAll();
    
        // Filter by status if needed
        let filteredMilestones = milestones;
        if (status !== 'all') {
          const resourceStatus = status === 'open' ? ResourceStatus.ACTIVE : ResourceStatus.CLOSED;
          filteredMilestones = milestones.filter(milestone => milestone.status === resourceStatus);
        }
    
        // Sort the milestones
        filteredMilestones.sort((a, b) => {
          let valueA, valueB;
    
          switch(sort) {
            case 'due_date':
              valueA = a.dueDate || '';
              valueB = b.dueDate || '';
              break;
            case 'title':
              valueA = a.title;
              valueB = b.title;
              break;
            case 'created_at':
            default:
              valueA = a.createdAt;
              valueB = b.createdAt;
          }
    
          const comparison = valueA.localeCompare(valueB);
          return direction === 'asc' ? comparison : -comparison;
        });
    
        return filteredMilestones;
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • GitHub repository helper that executes GraphQL query to list all milestones and maps GitHub response to domain Milestone objects.
    async findAll(): Promise<Milestone[]> {
      const query = `
        query($owner: String!, $repo: String!) {
          repository(owner: $owner, name: $repo) {
            milestones(first: 100) {
              nodes {
                id
                number
                title
                description
                dueOn
                state
                createdAt
                updatedAt
              }
            }
          }
        }
      `;
    
      const response = await this.graphql<ListMilestonesResponse>(query, {
        owner: this.owner,
        repo: this.repo,
      });
    
      return response.repository.milestones.nodes.map(milestone => 
        this.mapGitHubMilestoneToMilestone(milestone)
      );
    }
  • ToolDefinition for list_milestones including Zod input schema (status, sort, direction), description, and usage examples.
    export const listMilestonesTool: ToolDefinition<ListMilestonesArgs> = {
      name: "list_milestones",
      description: "List milestones",
      schema: listMilestonesSchema as unknown as ToolSchema<ListMilestonesArgs>,
      examples: [
        {
          name: "List open milestones",
          description: "List all open milestones sorted by due date",
          args: {
            status: "open",
            sort: "due_date",
            direction: "asc"
          }
        }
      ]
    };
  • Registers listMilestonesTool (imported from ToolSchemas) in the central ToolRegistry singleton used by MCP server.
    this.registerTool(createMilestoneTool);
    this.registerTool(listMilestonesTool);
    this.registerTool(updateMilestoneTool);
    this.registerTool(deleteMilestoneTool);
Behavior1/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 of behavioral disclosure. 'List milestones' offers no insight into whether this is a read-only operation, its potential side effects, authentication requirements, rate limits, or output format. For a tool with three parameters and no output schema, this lack of behavioral context is a significant gap.

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 extremely concise at two words, with zero wasted text. It is front-loaded and efficiently states the core action, though this brevity comes at the cost of completeness. Every word earns its place by directly addressing the tool's function, albeit minimally.

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

Completeness1/5

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

Given the tool's complexity (three parameters, no output schema, no annotations), the description is grossly inadequate. It does not explain what the tool returns, how parameters affect results, or behavioral traits. For a list operation with filtering and sorting capabilities, this leaves critical gaps in understanding how to use the tool effectively.

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

Parameters1/5

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

The input schema has 0% description coverage, meaning parameters 'status', 'sort', and 'direction' are entirely undocumented in the schema. The description adds no information about these parameters—their meanings, allowed values, or usage—failing to compensate for the schema's deficiencies. This leaves the agent with no semantic understanding of the inputs.

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

Purpose2/5

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

The description 'List milestones' is a tautology that merely restates the tool name without adding meaningful context. It specifies the verb 'list' and resource 'milestones' but lacks any detail about scope, format, or what distinguishes it from sibling tools like 'get_milestone_metrics', 'get_overdue_milestones', or 'get_upcoming_milestones'. This minimal statement fails to clarify the tool's specific purpose beyond the obvious.

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

Usage Guidelines1/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 does not mention any context, prerequisites, or exclusions, nor does it reference sibling tools that might serve similar purposes (e.g., filtered milestone queries). Without such information, an agent cannot make informed decisions about tool selection.

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