Skip to main content
Glama

update_milestone

Modify GitHub milestone details including title, description, due date, and status to track project progress and deadlines.

Instructions

Update a GitHub milestone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
milestoneIdYes
titleNo
descriptionNo
dueDateYes
stateNo

Implementation Reference

  • Primary handler for update_milestone tool: validates input, maps to domain model, calls repository to update GitHub milestone
    async updateMilestone(data: {
      milestoneId: string;
      title?: string;
      description?: string;
      dueDate?: string | null;
      state?: 'open' | 'closed';
    }): Promise<Milestone> {
      try {
        // Convert state to ResourceStatus if provided
        let status: ResourceStatus | undefined;
        if (data.state) {
          status = data.state === 'open' ? ResourceStatus.ACTIVE : ResourceStatus.CLOSED;
        }
    
        // Map input data to domain model
        const milestoneData: Partial<Milestone> = {
          title: data.title,
          description: data.description,
          dueDate: data.dueDate === null ? undefined : data.dueDate,
          status
        };
    
        // Clean up undefined values
        Object.keys(milestoneData).forEach(key => {
          if (milestoneData[key as keyof Partial<Milestone>] === undefined) {
            delete milestoneData[key as keyof Partial<Milestone>];
          }
        });
    
        return await this.milestoneRepo.update(data.milestoneId, milestoneData);
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Core implementation: calls GitHub REST API octokit.rest.issues.updateMilestone to perform the actual update
    async update(id: MilestoneId, data: Partial<Milestone>): Promise<Milestone> {
      // Use REST API for milestone updates since GraphQL doesn't support it
      const response = await this.rest(
        (params) => this.octokit.rest.issues.updateMilestone(params),
        {
          milestone_number: parseInt(id),
          title: data.title,
          description: data.description,
          due_on: data.dueDate,
          state: data.status === ResourceStatus.CLOSED ? "closed" : "open",
        }
      );
    
      return this.mapRestMilestoneToMilestone(response);
    }
  • Zod input schema validation for update_milestone tool
    // Schema for update_milestone tool
    export const updateMilestoneSchema = z.object({
      milestoneId: z.string().min(1, "Milestone ID is required"),
      title: z.string().optional(),
      description: z.string().optional(),
      dueDate: z.string().datetime().optional().nullable(),
      state: z.enum(["open", "closed"]).optional(),
    });
    
    export type UpdateMilestoneArgs = z.infer<typeof updateMilestoneSchema>;
  • Registers the update_milestone tool in the central ToolRegistry during initialization
    this.registerTool(updateMilestoneTool);
  • MCP tool dispatch handler: routes call_tool requests for 'update_milestone' to ProjectManagementService
    case "update_milestone":
      return await this.service.updateMilestone(args);
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. 'Update' implies a mutation operation, but it doesn't specify whether this requires specific permissions, if changes are reversible, what happens to unspecified fields, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 wasted words. It's appropriately sized and front-loaded, stating the core purpose immediately without unnecessary elaboration.

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 tool's complexity (5 parameters, mutation operation), lack of annotations, and no output schema, the description is incomplete. It doesn't provide enough context for an agent to understand how to use the tool effectively, what to expect in return, or the implications of using it.

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 schema description coverage is 0%, meaning none of the 5 parameters are documented in the schema. The description adds no information about parameters beyond the tool name, failing to compensate for the coverage gap. It doesn't explain what 'milestoneId', 'title', 'description', 'dueDate', or 'state' represent or how to use them.

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 'Update' and resource 'GitHub milestone', making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'update_issue' or 'update_project' tools, which also update GitHub resources, nor does it mention what aspects of a milestone can be updated beyond the generic term.

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. It doesn't mention prerequisites (e.g., needing an existing milestone ID), when not to use it (e.g., for creating milestones, which has a sibling 'create_milestone'), or how it compares to other update tools like 'update_issue' or 'update_project'.

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