Skip to main content
Glama

update_issue

Modify existing GitLab project issues by updating titles, descriptions, states, labels, assignees, or milestones to track progress and manage tasks.

Instructions

Update an existing issue in a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID or URL-encoded path
issue_iidYesIssue internal ID
titleNoNew issue title
descriptionNoNew issue description
state_eventNoChange issue state
labelsNoArray of label names
assignee_idsNoArray of user IDs to assign
milestone_idNoMilestone ID to assign

Implementation Reference

  • Implementation of the updateIssue API handler, which performs a PUT request to the GitLab API to update an issue's details.
    export async function updateIssue(
      projectId: string,
      issueIid: number,
      options: {
        title?: string;
        description?: string;
        state_event?: "close" | "reopen";
        labels?: string[];
        assignee_ids?: number[];
        milestone_id?: number;
      }
    ): Promise<GitLabIssue> {
      if (!projectId?.trim()) {
        throw new Error("Project ID is required");
      }
      if (!issueIid || issueIid < 1) {
        throw new Error("Valid issue IID is required");
      }
    
      const endpoint = `/projects/${encodeProjectId(projectId)}/issues/${issueIid}`;
    
      const issue = await gitlabPut<GitLabIssue>(endpoint, {
        ...options,
        labels: options.labels?.join(",")
      });
    
      return GitLabIssueSchema.parse(issue);
    }

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