Review a Merge Request
Complete workflow for performing a thorough code review using GitLab MCP.
Step 1: Find MRs to Review
"Show me MRs waiting for my review in
my-org/api"
"List open MRs with label
needs-reviewinmy-org/frontend"
json
{
"action": "list",
"project_id": "my-org/api",
"state": "opened",
"reviewer_username": "my-username",
"per_page": 20
}json
{
"action": "list",
"project_id": "my-org/api",
"state": "opened",
"labels": "needs-review",
"per_page": 20
}Step 2: Get MR Details
"Show me the details of MR !42 in
my-org/api"
"What's the description and discussion status of MR !42?"
json
{
"action": "get",
"project_id": "my-org/api",
"merge_request_iid": "42"
}json
{
"action": "get",
"project_id": "my-org/api",
"branch_name": "feature/login-refactor"
}Step 3: View the Diff
"Show me the file changes in MR !42"
"What files were modified in this MR?"
json
{
"action": "diffs",
"project_id": "my-org/api",
"merge_request_iid": "42",
"per_page": 50
}json
{
"action": "compare",
"project_id": "my-org/api",
"from": "main",
"to": "feature/login-refactor"
}Step 4: Read Existing Discussions
"Show me the discussion threads on MR !42"
"Are there unresolved discussions?"
json
{
"action": "list",
"project_id": "my-org/api",
"merge_request_iid": "42",
"per_page": 50
}Step 5: Leave Feedback
"Add a comment on MR !42 saying the implementation looks good"
"Start a discussion thread on MR !42 about the error handling"
json
{
"action": "comment",
"project_id": "my-org/api",
"noteable_type": "merge_request",
"noteable_id": "42",
"body": "LGTM! Clean implementation with good test coverage."
}json
{
"action": "thread",
"project_id": "my-org/api",
"merge_request_iid": "42",
"body": "Consider adding error handling for the null case here."
}Step 6: Approve or Request Changes
"Approve MR !42 in
my-org/api"
"Check the approval status of MR !42"
json
{
"action": "approve",
"project_id": "my-org/api",
"merge_request_iid": "42"
}json
{
"action": "get_approval_state",
"project_id": "my-org/api",
"merge_request_iid": "42"
}Tips for Effective Reviews
- Read the description first — Understand the intent before looking at code
- Check the diff size — Large diffs may need multiple review passes
- Look at test coverage — Verify tests exist for new functionality
- Check pipeline status — Ensure CI passes before approving
- Use suggestions — Provide concrete fixes, not just complaints
Next Steps
- Suggest Changes — Add code suggestions
- Apply Feedback — Apply suggestions from reviews
