add_inline_comment
Add a comment to a specific line of code in a pull request or merge request, specifying the file, line number, and line type (old or new). Supports GitHub and GitLab.
Instructions
Add inline comment to a specific code line in PR/MR
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": {
"provider": "<provider>",
"repo": "<repo>",
"pr_id": "<pr_id>",
"file_path": "<file_path>",
"line": "<line>",
"line_type": "<line_type>",
"comment": "<comment>"
},
"name": "add_inline_comment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| provider | Yes | Code hosting provider | |
| repo | Yes | Repository path | |
| pr_id | Yes | PR/MR number | |
| file_path | Yes | Path to the file | |
| line | Yes | Line number to comment on | |
| line_type | Yes | Line type: 'old' for deleted line, 'new' for added line | |
| comment | Yes | Comment content | |
| host | No | GitLab host for self-hosted instances |