MCP Tools Reference: securesourcemanager.googleapis.com

Tool: list_pull_request_file_diffs

Returns a list of files that have changed in the pull request, including the contents of the diff between the branches of the pull request.

The following code sample shows how to use curl to call the list_pull_request_file_diffs 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_file_diffs",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'

Input Schema

ListPullRequestFileDiffsRequest is the request to list pull request file diffs.

ListPullRequestFileDiffsRequest

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

string

Required. The pull request to list file diffs for. 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

ListPullRequestFileDiffsResponse is the response containing file diffs returned from ListPullRequestFileDiffs.

ListPullRequestFileDiffsResponse

JSON representation
{
  "fileDiffs": [
    {
      object (FileDiff)
    }
  ],
  "nextPageToken": string
}
Fields
fileDiffs[]

object (FileDiff)

The list of pull request file diffs.

nextPageToken

string

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

FileDiff

JSON representation
{
  "name": string,
  "action": enum (Action),
  "sha": string,
  "patch": string
}
Fields
name

string

Output only. The name of the file.

action

enum (Action)

Output only. The action taken on the file (eg. added, modified, deleted).

sha

string

Output only. The commit pointing to the file changes.

patch

string

Output only. The git patch containing the file changes.

Action

Action taken on the file.

Enums
ACTION_UNSPECIFIED Unspecified.
ADDED The file was added.
MODIFIED The file was modified.
DELETED The file was deleted.

Tool Annotations

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