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
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID or path | |
| merge_request_iid | Yes | Merge request internal ID | |
| discussion_id | Yes | The ID of the discussion | |
| note_id | Yes | The ID of the note to update | |
| body | Yes | The new content of the note (supports Markdown) |
Implementation Reference
- src/handlers/merge-requests.ts:523-539 (handler)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), }, ], }; }
- src/tools/merge-requests.ts:540-568 (schema)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 );
- src/types.ts:521-527 (schema)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; }