Reviewmr-comments
GET/repositories/{repo_id}/merge-requests/{mr_id}/discussions
List all comments grouped by thread (discussions)
list_mr_discussions
mr_comment:read
A token needs themr_comment:readscope: View merge-request commentsGranted bymcp_agent,mcp_agent_write,read_api,read_repository,write_api,write_repository.Every operation this scope unlocksSingle-resource
x-gitmoap-isolation: {"kind":"single_or_self_scoped"}
Every comment on the merge request in one answer, grouped into threads: each root comment with its replies, threads and replies alike oldest first. Anyone who can read the merge request may call it.
Parameters
Path
- repo_idRepositoryId (string · uuid)Repository ID
- mr_idMergeRequestId (integer · int64)Merge request ID
Responses
200Discussions listedapplication/json
200 exampleSynthesized example
[
{
"replies": [
{
"author": {},
"body": "Renders each region as density contours of its operations.",
"comment_id": "5f91ff4f-b3d1-4e36-90bc-b71ca8250348",
"created_at": "2026-10-14T19:06:05Z",
"edited": false,
"merge_request_id": 42,
"reply_count": 4,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"thread_id": "73e06b06-6a89-47d1-a5cc-57cc749602c2",
"updated_at": "2026-10-13T05:15:43Z"
}
],
"root": {
"author": {
"email": "lin@acme.example",
"id": "id-0e46",
"username": "tomas"
},
"body": "Renders each region as density contours of its operations.",
"comment_id": "65ee05fd-29cd-41ea-b4b4-4b41c1cb9916",
"created_at": "2026-10-16T09:04:13Z",
"edited": false,
"merge_request_id": 42,
"reply_count": 1,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"thread_id": "8aa588ca-2dee-47ae-b50e-ea23bf431fbe",
"updated_at": "2026-10-12T14:36:19Z"
}
},
{
"replies": [
{
"author": {},
"body": "Renders each region as density contours of its operations.",
"comment_id": "b29df22b-d7ab-49ce-a88e-d13cf5f9f0bb",
"created_at": "2026-10-15T20:15:42Z",
"edited": false,
"merge_request_id": 42,
"reply_count": 3,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"thread_id": "fd9aae2b-4a91-4cdf-9f35-0de3a55c5695",
"updated_at": "2026-10-15T20:00:54Z"
},
{
"author": {},
"body": "Renders each region as density contours of its operations.",
"comment_id": "0142419f-248c-498e-a3c3-4a45df10ed5c",
"created_at": "2026-10-13T10:48:13Z",
"edited": false,
"merge_request_id": 42,
"reply_count": 1,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"thread_id": "c144b42e-563d-4514-8ab1-44426151ec23",
"updated_at": "2026-10-12T14:26:13Z"
}
],
"root": {
"author": {
"email": "tomas@acme.example",
"id": "id-4cdd",
"username": "mara"
},
"body": "Renders each region as density contours of its operations.",
"comment_id": "c610c837-8c21-4e01-b5f3-c53eaec841a4",
"created_at": "2026-10-10T07:56:51Z",
"edited": false,
"merge_request_id": 42,
"reply_count": 4,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"thread_id": "00f63dd7-799e-45f2-85b7-df90996c403d",
"updated_at": "2026-10-10T09:34:03Z"
}
}
]
400Bad request — a path parameter is not a well-formed value of its typeapplication/json
Error codes
- BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-a3ff",
"message": "Inline scalar newtypes but keep their brand"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
- UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-9c61",
"message": "Stream pipeline status into the run header"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
- FORBIDDENYou are signed in but may not do this here;
reasonnames the permission or the rule that refused it - INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs;
required_scopenames it - PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-2ab1",
"message": "Draw the region map from operation density"
}
}
404Not found — or found and private, which is masked as absentapplication/json
Error codes
- NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
errorErrorBody
- The ErrorBody schema
- codestringThe coarse category, tied to the status:
NOT_FOUND,CONFLICT,INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all. - messagestringWhat went wrong, for a person. Written to be read, not parsed: match on
reasonorcode. - fieldstring or nulloptionalOn a
400that refused one field's value, the field, as its JSON path:email,items[0].name. Put the message under that input. Absent on every other error. - reasonstring or nulloptionalThe specific code, when the error has one:
LAST_ORGANIZATION_OWNER,BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-7865",
"message": "Stream pipeline status into the run header"
}
}
CLI
gitmoap mr-comments list-mr-discussions
- --repo-ididRepository ID (id or owner/repo path)
- --mr-ididMerge request ID