Tool: list_branch_rules
Lists branch rules in a Secure Source Manager repository.
The following code sample shows how to use curl to call the list_branch_rules 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_branch_rules", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
ListBranchRulesRequest is the request to list branch rules.
ListBranchRulesRequest
| JSON representation |
|---|
{ "parent": string, "pageSize": integer, "pageToken": string } |
| Fields | |
|---|---|
parent |
|
pageSize |
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 |
Optional. A token identifying a page of results the server should return. |
Output Schema
ListBranchRulesResponse is the response to listing branchRules.
ListBranchRulesResponse
| JSON representation |
|---|
{
"branchRules": [
{
object ( |
| Fields | |
|---|---|
branchRules[] |
The list of branch rules. |
nextPageToken |
A token identifying a page of results the server should return. |
BranchRule
| JSON representation |
|---|
{
"name": string,
"uid": string,
"createTime": string,
"updateTime": string,
"annotations": {
string: string,
...
},
"etag": string,
"includePattern": string,
"disabled": boolean,
"requirePullRequest": boolean,
"minimumReviewsCount": integer,
"minimumApprovalsCount": integer,
"requireCodeOwnerApproval": boolean,
"requireCommentsResolved": boolean,
"allowStaleReviews": boolean,
"requireLinearHistory": boolean,
"requiredStatusChecks": [
{
object ( |
| Fields | |
|---|---|
name |
Identifier. A unique identifier for a BranchRule. The name should be of the format: |
uid |
Output only. Unique identifier of the repository. |
createTime |
Output only. Create 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. Update 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: |
annotations |
Optional. User annotations. These attributes can only be set and used by the user. See https://google.aip.dev/128#annotations for more details such as format and size limitations. An object containing a list of |
etag |
Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
includePattern |
Optional. The pattern of the branch that can match to this BranchRule. Specified as regex. .* for all branches. Examples: main, (main|release.*). Current MVP phase only support |
disabled |
Optional. Determines if the branch rule is disabled or not. |
requirePullRequest |
Optional. Determines if the branch rule requires a pull request or not. |
minimumReviewsCount |
Optional. The minimum number of reviews required for the branch rule to be matched. |
minimumApprovalsCount |
Optional. The minimum number of approvals required for the branch rule to be matched. |
requireCodeOwnerApproval |
Optional. Determines if code owners must approve before merging to the branch. |
requireCommentsResolved |
Optional. Determines if require comments resolved before merging to the branch. |
allowStaleReviews |
Optional. Determines if allow stale reviews or approvals before merging to the branch. |
requireLinearHistory |
Optional. Determines if require linear history before merging to the branch. |
requiredStatusChecks[] |
Optional. List of required status checks before merging to the branch. |
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. |
AnnotationsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
Check
| JSON representation |
|---|
{ "context": string } |
| Fields | |
|---|---|
context |
Required. The context of the check. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ✅ | Open World Hint: ❌