create_mr_discussion
Create discussions on merge requests. Add general comments or inline diff comments with Markdown and file attachments.
Instructions
Create a new discussion on a merge request. Can be a general discussion or an inline comment on the diff. Supports embedding images/files via attachments parameter.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | The content of the discussion (supports Markdown). Use {{placeholderName}} syntax to embed attachments. | |
| position | No | Position for inline/diff comments. Required fields: base_sha, start_sha, head_sha, old_path, new_path. Use new_line for additions, old_line for deletions, both for context lines. | |
| project_id | Yes | Project ID or path | |
| attachments | No | Map of placeholder names to local file paths. Each file is uploaded and {{placeholderName}} in body is replaced with the GitLab markdown. Example: {"screenshot": "/tmp/screenshot.png"} replaces {{screenshot}} with  | |
| merge_request_iid | Yes | Merge request internal ID |