Skip to main content
Glama

gitlab_update_issue

Modify GitLab issue details including title, description, labels, assignees, and state to keep project tracking current.

Instructions

Updates an existing GitLab issue.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesThe path of the GitLab project.
issueIidYesThe internal ID of the issue.
updatesYesFields to update.

Implementation Reference

  • Core implementation of the gitlab_update_issue tool. This method constructs the update payload and makes the PUT request to the GitLab API to update the specified issue.
    async updateIssue(projectPath: string, issueIid: number, updates: { title?: string; description?: string; labels?: string[]; assigneeIds?: number[]; state?: 'close' | 'reopen'; }): Promise<any> { const encodedProjectPath = encodeURIComponent(projectPath); const body: any = {}; if (updates.title) body.title = updates.title; if (updates.description) body.description = updates.description; if (updates.labels) body.labels = updates.labels.join(','); if (updates.assigneeIds) body.assignee_ids = updates.assigneeIds; if (updates.state) body.state_event = updates.state; return this.callGitLabApi<any>( `projects/${encodedProjectPath}/issues/${issueIid}`, 'PUT', body, ); }
  • src/index.ts:897-925 (registration)
    Registers the 'gitlab_update_issue' tool in the MCP server, defining its name, description, and input schema.
    { name: 'gitlab_update_issue', description: 'Updates an existing GitLab issue.', inputSchema: { type: 'object', properties: { projectPath: { type: 'string', description: 'The path of the GitLab project.', }, issueIid: { type: 'number', description: 'The internal ID of the issue.', }, updates: { type: 'object', properties: { title: { type: 'string' }, description: { type: 'string' }, labels: { type: 'array', items: { type: 'string' } }, assigneeIds: { type: 'array', items: { type: 'number' } }, state: { type: 'string', enum: ['close', 'reopen'] }, }, description: 'Fields to update.', }, }, required: ['projectPath', 'issueIid', 'updates'], }, },
  • MCP tool call handler that extracts parameters from the request and delegates to GitLabService.updateIssue, returning the result.
    case 'gitlab_update_issue': { if (!gitlabService) { throw new Error('GitLab service is not initialized.'); } const { projectPath, issueIid, updates } = args as { projectPath: string; issueIid: number; updates: { title?: string; description?: string; labels?: string[]; assigneeIds?: number[]; state?: 'close' | 'reopen'; }; }; const result = await gitlabService.updateIssue(projectPath, issueIid, updates); return { content: [ { type: 'text', text: `Issue updated successfully: ${JSON.stringify(result, 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/HainanZhao/mcp-gitlab-jira'

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