create_merge_request_thread
Start a discussion thread on a GitLab merge request to provide feedback, ask questions, or collaborate on code changes with team members.
Instructions
Create a new thread on a merge request
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| merge_request_iid | Yes | The IID of a merge request | |
| body | Yes | The content of the thread | |
| position | No | Position when creating a diff note | |
| created_at | No | Date the thread was created at (ISO 8601 format) |
Input Schema (JSON Schema)
{
"properties": {
"body": {
"description": "The content of the thread",
"type": "string"
},
"created_at": {
"description": "Date the thread was created at (ISO 8601 format)",
"type": "string"
},
"merge_request_iid": {
"description": "The IID of a merge request",
"type": "number"
},
"position": {
"additionalProperties": false,
"description": "Position when creating a diff note",
"properties": {
"base_sha": {
"description": "Base commit SHA in the source branch",
"type": "string"
},
"head_sha": {
"description": "SHA referencing HEAD of the source branch",
"type": "string"
},
"height": {
"description": "Height of the image (for image diffs)",
"type": "number"
},
"new_line": {
"description": "Line number after change",
"type": [
"number",
"null"
]
},
"new_path": {
"description": "File path after change",
"type": "string"
},
"old_line": {
"description": "Line number before change",
"type": [
"number",
"null"
]
},
"old_path": {
"description": "File path before change",
"type": "string"
},
"position_type": {
"description": "Type of position reference",
"enum": [
"text",
"image",
"file"
],
"type": "string"
},
"start_sha": {
"description": "SHA referencing the start commit of the source branch",
"type": "string"
},
"width": {
"description": "Width of the image (for image diffs)",
"type": "number"
},
"x": {
"description": "X coordinate on the image (for image diffs)",
"type": "number"
},
"y": {
"description": "Y coordinate on the image (for image diffs)",
"type": "number"
}
},
"required": [
"base_sha",
"head_sha",
"start_sha",
"position_type"
],
"type": "object"
},
"project_id": {
"description": "Project ID or complete URL-encoded path to project",
"type": "string"
}
},
"required": [
"project_id",
"merge_request_iid",
"body"
],
"type": "object"
}