Skip to main content
Glama

delete_milestone

Remove a GitHub milestone to clean up project tracking and maintain organized project management workflows.

Instructions

Delete a GitHub milestone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
milestoneIdYes

Implementation Reference

  • Core implementation of milestone deletion using GitHub REST API (octokit.rest.issues.deleteMilestone). This is the actual execution logic for deleting the milestone.
    async delete(id: MilestoneId): Promise<void> {
      // Use REST API for milestone deletion since GraphQL doesn't support it
      await this.rest(
        (params) => this.octokit.rest.issues.deleteMilestone(params),
        {
          milestone_number: parseInt(id)
        }
      );
    }
  • Service layer handler for delete_milestone tool. Calls the repository to delete the milestone and returns formatted success response.
    async deleteMilestone(data: {
      milestoneId: string;
    }): Promise<{ success: boolean; message: string }> {
      try {
        await this.milestoneRepo.delete(data.milestoneId);
    
        return {
          success: true,
          message: `Milestone ${data.milestoneId} has been deleted`
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • MCP tool dispatch handler in executeToolHandler switch statement. Dispatches delete_milestone tool call to the ProjectManagementService.
    case "delete_milestone":
      return await this.service.deleteMilestone(args);
  • Zod schema definition for delete_milestone tool input validation (milestoneId: string).
    // Schema for delete_milestone tool
    export const deleteMilestoneSchema = z.object({
      milestoneId: z.string().min(1, "Milestone ID is required"),
    });
    
    export type DeleteMilestoneArgs = z.infer<typeof deleteMilestoneSchema>;
    
    // Schema for update_sprint tool
    export const updateSprintSchema = z.object({
      sprintId: z.string().min(1, "Sprint ID is required"),
      title: z.string().optional(),
      description: z.string().optional(),
      startDate: z.string().datetime().optional(),
      endDate: z.string().datetime().optional(),
      status: z.enum(["planned", "active", "completed"]).optional(),
    });
    
    export type UpdateSprintArgs = z.infer<typeof updateSprintSchema>;
    
    // Schema for add_issues_to_sprint tool
    export const addIssuesToSprintSchema = z.object({
  • Registration of deleteMilestoneTool in the central ToolRegistry during initialization.
    this.registerTool(deleteMilestoneTool);
  • ToolDefinition for delete_milestone including name, description, schema reference, and usage examples.
    export const deleteMilestoneTool: ToolDefinition<DeleteMilestoneArgs> = {
      name: "delete_milestone",
      description: "Delete a GitHub milestone",
      schema: deleteMilestoneSchema as unknown as ToolSchema<DeleteMilestoneArgs>,
      examples: [
        {
          name: "Delete milestone",
          description: "Delete a milestone by ID",
          args: {
            milestoneId: "42"
          }
        }
      ]
    };
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. 'Delete' implies a destructive, irreversible mutation, but the description doesn't specify permissions required, confirmation prompts, error handling, or what happens to associated issues. For a destructive tool with zero annotation coverage, this leaves critical behavioral traits unaddressed.

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 front-loaded with the core action and resource, making it immediately scannable. Every word earns its place, and there's no redundancy or 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?

For a destructive mutation tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It lacks critical context: behavioral risks, parameter details, error cases, and output expectations. The description doesn't compensate for the missing structured data, leaving the agent under-informed about a high-stakes operation.

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 for undocumented parameters. It mentions 'milestone' but doesn't explain what 'milestoneId' represents (e.g., numeric ID vs. title), how to obtain it, or format constraints. With 1 parameter fully undocumented in the schema, the description adds minimal semantic value beyond the tool name.

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 ('Delete') and resource ('a GitHub milestone'), making the purpose immediately understandable. It distinguishes from siblings like 'update_milestone' and 'list_milestones' by specifying the destructive action. However, it doesn't explicitly differentiate from other deletion tools like 'delete_project', so it's not fully sibling-aware.

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 milestone ID from 'list_milestones' or 'get_milestone_metrics'), exclusions, or comparisons to similar tools like 'update_milestone' for modification instead of deletion. Usage is implied but not explicitly stated.

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