create_milestone
Enhance project tracking by setting milestones with titles, descriptions, and due dates. Integrates with GitHub Projects V2 for streamlined workflow management.
Instructions
Create a new milestone
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| dueDate | No | ||
| title | Yes |
Implementation Reference
- Core handler function that executes the create_milestone tool logic. Validates input, constructs CreateMilestone object, and calls GitHubMilestoneRepository.create to perform the actual GitHub API call.async createMilestone(data: { title: string; description: string; dueDate?: string; }): Promise<Milestone> { try { const milestoneData: CreateMilestone = { title: data.title, description: data.description, dueDate: data.dueDate, }; return await this.milestoneRepo.create(milestoneData); } catch (error) { throw this.mapErrorToMCPError(error); } }
- Tool definition including input schema (createMilestoneSchema), description, and usage examples for the create_milestone tool.export const createMilestoneTool: ToolDefinition<CreateMilestoneArgs> = { name: "create_milestone", description: "Create a new milestone", schema: createMilestoneSchema as unknown as ToolSchema<CreateMilestoneArgs>, examples: [ { name: "Create milestone with due date", description: "Create a milestone with title, description and due date", args: { title: "Beta Release", description: "Complete all features for beta release", dueDate: "2025-06-30T00:00:00Z" } } ] };
- src/infrastructure/tools/ToolRegistry.ts:202-205 (registration)Registers the createMilestoneTool in the central ToolRegistry singleton instance.this.registerTool(createMilestoneTool); this.registerTool(listMilestonesTool); this.registerTool(updateMilestoneTool); this.registerTool(deleteMilestoneTool);
- src/index.ts:287-288 (registration)MCP tool dispatch handler in main server that routes create_milestone calls to ProjectManagementService.createMilestone.case "create_milestone": return await this.service.createMilestone(args);
- Zod input validation schema defining parameters for create_milestone tool: required title and description, optional dueDate.export const createMilestoneSchema = z.object({ title: z.string().min(1, "Milestone title is required"), description: z.string().min(1, "Milestone description is required"), dueDate: z.string().datetime("Due date must be a valid ISO date string").optional(), });