MCP Tools Reference: securesourcemanager.googleapis.com

Tool: list_pull_request_comments

Returns a list of comments on a pull request in a Secure Source Manager repository.

The following code sample shows how to use curl to call the list_pull_request_comments MCP tool.

Curl Request
curl --location 'https://securesourcemanager.europe-west4.rep.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "list_pull_request_comments",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'

Input Schema

The request to list pull request comments.

ListPullRequestCommentsRequest

JSON representation
{
  "parent": string,
  "pageSize": integer,
  "pageToken": string
}
Fields
parent

string

Required. The pull request in which to list pull request comments. Format: projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}

pageSize

integer

Optional. Requested page size. If unspecified, a default size of 30 will be used. The maximum value is 100; values above 100 will be coerced to 100.

pageToken

string

Optional. A token identifying a page of results the server should return.

Output Schema

The response to list pull request comments.

ListPullRequestCommentsResponse

JSON representation
{
  "pullRequestComments": [
    {
      object (PullRequestComment)
    }
  ],
  "nextPageToken": string
}
Fields
pullRequestComments[]

object (PullRequestComment)

The list of pull request comments.

nextPageToken

string

A token to set as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

PullRequestComment

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,

  // Union field comment_detail can be only one of the following:
  "review": {
    object (Review)
  },
  "comment": {
    object (Comment)
  },
  "code": {
    object (Code)
  }
  // End of list of possible types for union field comment_detail.
}
Fields
name

string

Identifier. Unique identifier for the pull request comment. The comment id is generated by the server. Format: projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}

createTime

string (Timestamp format)

Output only. Creation timestamp.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

updateTime

string (Timestamp format)

Output only. Last updated timestamp.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Union field comment_detail. The comment detail. A comment can be a review, a general comment, or a code comment. comment_detail can be only one of the following:
review

object (Review)

Optional. The review summary comment.

comment

object (Comment)

Optional. The general pull request comment.

code

object (Code)

Optional. The comment on a code line.

Timestamp

JSON representation
{
  "seconds": string,
  "nanos": integer
}
Fields
seconds

string (int64 format)

Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).

nanos

integer

Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive.

Review

JSON representation
{
  "actionType": enum (ActionType),
  "body": string,
  "effectiveCommitSha": string
}
Fields
actionType

enum (ActionType)

Required. The review action type.

body

string

Optional. The comment body.

effectiveCommitSha

string

Output only. The effective commit sha this review is pointing to.

Comment

JSON representation
{
  "body": string
}
Fields
body

string

Required. The comment body.

Code

JSON representation
{
  "body": string,
  "reply": string,
  "position": {
    object (Position)
  },
  "effectiveRootComment": string,
  "resolved": boolean,
  "effectiveCommitSha": string
}
Fields
body

string

Required. The comment body.

reply

string

Optional. Input only. The PullRequestComment resource name that this comment is replying to.

position

object (Position)

Optional. The position of the comment.

effectiveRootComment

string

Output only. The root comment of the conversation, derived from the reply field.

resolved

boolean

Output only. Boolean indicator if the comment is resolved.

effectiveCommitSha

string

Output only. The effective commit sha this code comment is pointing to.

Position

JSON representation
{
  "path": string,
  "line": string
}
Fields
path

string

Required. The path of the file.

line

string (int64 format)

Required. The line number of the comment. Positive value means it's on the new side of the diff, negative value means it's on the old side.

ActionType

The review action type.

Enums
ACTION_TYPE_UNSPECIFIED Unspecified.
COMMENT A general review comment.
CHANGE_REQUESTED Change required from this review.
APPROVED Change approved from this review.

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ✅ | Open World Hint: ❌