Create Code Discussion
post_code_discussionCreate an inline comment on a merge request at a specific file and line for contextual code discussions.
Instructions
Create an inline code discussion on a specific file and line of a merge request.
Args: project: Project key (e.g., "ij") review_id: MR number (e.g., "194108") or internal ID repository: Repository name (e.g., "ultimate") revision: Git commit SHA the comment is anchored to filename: File path (e.g., "src/main.py") line: Line number (new side of the diff) text: Comment text (Markdown supported)
Returns: Confirmation with file and line reference.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>",
"review_id": "<review_id>",
"repository": "<repository>",
"revision": "<revision>",
"filename": "<filename>",
"line": "<line>",
"text": "<text>"
},
"name": "post_code_discussion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| text | Yes | ||
| project | Yes | ||
| filename | Yes | ||
| revision | Yes | ||
| review_id | Yes | ||
| repository | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |