Tool: get_pull_request_comment
Retrieves details of a comment from a pull request in a Secure Source Manager repository.
The following code sample shows how to use curl to call the get_pull_request_comment 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": "get_pull_request_comment", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
The request to get a pull request comment.
GetPullRequestCommentRequest
| JSON representation |
|---|
{ "name": string } |
| Fields | |
|---|---|
name |
Required. Name of the pull request comment to retrieve. The format is |
Output Schema
PullRequestComment represents a comment on a pull request.
PullRequestComment
| JSON representation |
|---|
{ "name": string, "createTime": string, "updateTime": string, // Union field |
| Fields | |
|---|---|
name |
Identifier. Unique identifier for the pull request comment. The comment id is generated by the server. Format: |
createTime |
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: |
updateTime |
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: |
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 |
Optional. The review summary comment. |
comment |
Optional. The general pull request comment. |
code |
Optional. The comment on a code line. |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
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 |
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 ( |
| Fields | |
|---|---|
actionType |
Required. The review action type. |
body |
Optional. The comment body. |
effectiveCommitSha |
Output only. The effective commit sha this review is pointing to. |
Comment
| JSON representation |
|---|
{ "body": string } |
| Fields | |
|---|---|
body |
Required. The comment body. |
Code
| JSON representation |
|---|
{
"body": string,
"reply": string,
"position": {
object ( |
| Fields | |
|---|---|
body |
Required. The comment body. |
reply |
Optional. Input only. The PullRequestComment resource name that this comment is replying to. |
position |
Optional. The position of the comment. |
effectiveRootComment |
Output only. The root comment of the conversation, derived from the reply field. |
resolved |
Output only. Boolean indicator if the comment is resolved. |
effectiveCommitSha |
Output only. The effective commit sha this code comment is pointing to. |
Position
| JSON representation |
|---|
{ "path": string, "line": string } |
| Fields | |
|---|---|
path |
Required. The path of the file. |
line |
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: ❌