Skip to main content
Glama

update_milestone

Modify milestone details like title, description, due date, or state in a GitLab project to track project progress and deadlines.

Instructions

Update an existing milestone in a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
milestone_idYes
titleNo
descriptionNo
due_dateNo
start_dateNo
state_eventNo

Implementation Reference

  • The actual handler implementation for update_milestone, which performs a PUT request to the GitLab API.
    export async function updateMilestone(
      projectId: string,
      milestoneId: number,
      options: {
        title?: string;
        description?: string;
        due_date?: string;
        start_date?: string;
        state_event?: "close" | "activate";
      }
    ): Promise<GitLabMilestoneResponse> {
      if (!projectId?.trim()) {
        throw new Error("Project ID is required");
      }
      if (!milestoneId || milestoneId < 1) {
        throw new Error("Valid milestone ID is required");
      }
    
      const endpoint = `/projects/${encodeProjectId(projectId)}/milestones/${milestoneId}`;
    
      const milestone = await gitlabPut<GitLabMilestoneResponse>(endpoint, options);
      return GitLabMilestoneSchema.parse(milestone);
    }
  • The Zod schema defining the inputs for update_milestone.
    export const UpdateMilestoneSchema = z.object({
      project_id: z.string(),
      milestone_id: z.number(),
      title: z.string().optional(),
      description: z.string().optional(),
      due_date: z.string().optional(),
      start_date: z.string().optional(),
      state_event: z.enum(["close", "activate"]).optional()
    });
  • src/server.ts:344-349 (registration)
    The registration and routing logic for the update_milestone tool in the server request handler.
    case "update_milestone": {
      const args = UpdateMilestoneSchema.parse(request.params.arguments);
      const { project_id, milestone_id, ...options } = args;
      const milestone = await api.updateMilestone(project_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