update_group_milestone
Modify an existing milestone in a GitLab group by updating its title, description, dates, or state to track project progress and deadlines.
Instructions
Update an existing milestone in a GitLab group
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group_id | Yes | Group ID or URL-encoded path | |
| milestone_id | Yes | The ID of the group milestone | |
| title | No | The title of the milestone | |
| description | No | The description of the milestone | |
| due_date | No | The due date of the milestone (YYYY-MM-DD) | |
| start_date | No | The start date of the milestone (YYYY-MM-DD) | |
| state_event | No | The state event of the milestone |
Implementation Reference
- src/api/group-milestones.ts:67-89 (handler)The actual implementation of the update_group_milestone tool logic using gitlabPut.
export async function updateGroupMilestone( groupId: string, milestoneId: number, options: { title?: string; description?: string; due_date?: string; start_date?: string; state_event?: "close" | "activate"; } ): Promise<GitLabGroupMilestoneResponse> { if (!groupId?.trim()) { throw new Error("Group ID is required"); } if (!milestoneId || milestoneId < 1) { throw new Error("Valid milestone ID is required"); } const endpoint = `/groups/${encodeURIComponent(groupId)}/milestones/${milestoneId}`; const milestone = await gitlabPut<GitLabGroupMilestoneResponse>(endpoint, options); return GitLabGroupMilestoneSchema.parse(milestone); } - src/schemas.ts:375-383 (schema)Zod schema defining the input parameters for the update_group_milestone tool.
export const UpdateGroupMilestoneSchema = z.object({ group_id: z.string().describe("Group ID or URL-encoded path"), milestone_id: z.number().describe("The ID of the group milestone"), title: z.string().optional().describe("The title of the milestone"), description: z.string().optional().describe("The description of the milestone"), due_date: z.string().optional().describe("The due date of the milestone (YYYY-MM-DD)"), start_date: z.string().optional().describe("The start date of the milestone (YYYY-MM-DD)"), state_event: z.enum(["close", "activate"]).optional().describe("The state event of the milestone") }); - src/server.ts:377-382 (registration)Registration and request handling for the update_group_milestone tool in the MCP server.
case "update_group_milestone": { const args = UpdateGroupMilestoneSchema.parse(request.params.arguments); const { group_id, milestone_id, ...options } = args; const milestone = await api.updateGroupMilestone(group_id, milestone_id, options); return { content: [{ type: "text", text: JSON.stringify(milestone, null, 2) }] }; }