delete_mr_discussion_note
Remove a specific comment from a merge request discussion in GitLab to manage feedback and maintain clean conversations.
Instructions
Delete a note from a merge request discussion
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 delete |
Implementation Reference
- src/handlers/merge-requests.ts:559-578 (handler)The primary handler function that executes the tool logic by sending a DELETE request to the GitLab API to remove the specified note from an MR discussion.async deleteMRDiscussionNote(args: DeleteMRDiscussionNoteParams) { await this.client.delete( `/projects/${encodeURIComponent(args.project_id)}/merge_requests/${ args.merge_request_iid }/discussions/${args.discussion_id}/notes/${args.note_id}` ); return { content: [ { type: "text", text: JSON.stringify( { message: "Note deleted successfully" }, null, 2 ), }, ], }; }
- src/types.ts:536-541 (schema)TypeScript interface defining the input parameters for the deleteMRDiscussionNote handler.export interface DeleteMRDiscussionNoteParams { project_id: string; merge_request_iid: number; discussion_id: string; note_id: number; }
- src/tools/merge-requests.ts:595-620 (registration)MCP tool definition and input schema registration for 'delete_mr_discussion_note'.{ name: 'delete_mr_discussion_note', description: 'Delete a note from a merge request discussion', 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 delete', }, }, required: ['project_id', 'merge_request_iid', 'discussion_id', 'note_id'], }, },
- src/server.ts:243-246 (registration)Server dispatch logic that maps incoming tool calls for 'delete_mr_discussion_note' to the appropriate handler method.case "delete_mr_discussion_note": return await this.mergeRequestHandlers.deleteMRDiscussionNote( args as unknown as DeleteMRDiscussionNoteParams );