Skip to main content
Glama

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
NameRequiredDescriptionDefault
group_idYesGroup ID or URL-encoded path
milestone_idYesThe ID of the group milestone
titleNoThe title of the milestone
descriptionNoThe description of the milestone
due_dateNoThe due date of the milestone (YYYY-MM-DD)
start_dateNoThe start date of the milestone (YYYY-MM-DD)
state_eventNoThe state event of the milestone

Implementation Reference

  • 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);
    }
  • 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) }] };
    }

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/TheRealChrisThomas/gitlab-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server