Skip to main content
Glama
Alosies

GitLab MCP Server

by Alosies

update_mr_discussion_note

Modify an existing note in a GitLab merge request discussion to update feedback, correct information, or add new details using Markdown formatting.

Instructions

Modify an existing merge request discussion note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID or path
merge_request_iidYesMerge request internal ID
discussion_idYesThe ID of the discussion
note_idYesThe ID of the note to update
bodyYesThe new content of the note (supports Markdown)

Implementation Reference

  • The main handler function that executes the tool logic by sending a PUT request to the GitLab API to update the body of a specific note in a merge request discussion.
    async updateMRDiscussionNote(args: UpdateMRDiscussionNoteParams) {
      const data = await this.client.put(
        `/projects/${encodeURIComponent(args.project_id)}/merge_requests/${
          args.merge_request_iid
        }/discussions/${args.discussion_id}/notes/${args.note_id}`,
        { body: args.body }
      );
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • MCP tool definition including the inputSchema for parameter validation (project_id, merge_request_iid, discussion_id, note_id, body).
      name: 'update_mr_discussion_note',
      description: 'Modify an existing merge request discussion note',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'Project ID or path',
          },
          merge_request_iid: {
            type: 'number',
            description: 'Merge request internal ID',
          },
          discussion_id: {
            type: 'string',
            description: 'The ID of the discussion',
          },
          note_id: {
            type: 'number',
            description: 'The ID of the note to update',
          },
          body: {
            type: 'string',
            description: 'The new content of the note (supports Markdown)',
          },
        },
        required: ['project_id', 'merge_request_iid', 'discussion_id', 'note_id', 'body'],
      },
    },
  • src/server.ts:235-238 (registration)
    Server dispatch logic that maps the tool name to the corresponding handler method.
    case "update_mr_discussion_note":
      return await this.mergeRequestHandlers.updateMRDiscussionNote(
        args as unknown as UpdateMRDiscussionNoteParams
      );
  • TypeScript interface defining the parameters for the updateMRDiscussionNote handler.
    export interface UpdateMRDiscussionNoteParams {
      project_id: string;
      merge_request_iid: number;
      discussion_id: string;
      note_id: number;
      body: string;
    }

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

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