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

NameRequiredDescriptionDefault
milestoneIdYes

Input Schema (JSON Schema)

{ "properties": { "milestoneId": { "type": "string" } }, "required": [ "milestoneId" ], "type": "object" }

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" } } ] };

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