MCP Tools Reference: securesourcemanager.googleapis.com

Tool: list_hooks

Lists hooks in a Secure Source Manager repository.

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

Input Schema

ListHooksRequest is request to list hooks.

ListHooksRequest

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

string

Required. Parent value for ListHooksRequest.

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

ListHooksResponse is response to list hooks.

ListHooksResponse

JSON representation
{
  "hooks": [
    {
      object (Hook)
    }
  ],
  "nextPageToken": string
}
Fields
hooks[]

object (Hook)

The list of hooks.

nextPageToken

string

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

Hook

JSON representation
{
  "name": string,
  "targetUri": string,
  "disabled": boolean,
  "events": [
    enum (HookEventType)
  ],
  "createTime": string,
  "updateTime": string,
  "uid": string,
  "pushOption": {
    object (PushOption)
  },
  "sensitiveQueryString": string
}
Fields
name

string

Identifier. A unique identifier for a Hook. The name should be of the format: projects/{project}/locations/{location_id}/repositories/{repository_id}/hooks/{hook_id}

targetUri

string

Required. The target URI to which the payloads will be delivered.

disabled

boolean

Optional. Determines if the hook disabled or not. Set to true to stop sending traffic.

events[]

enum (HookEventType)

Optional. The events that trigger hook on.

createTime

string (Timestamp format)

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: "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. 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: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

uid

string

Output only. Unique identifier of the hook.

pushOption

object (PushOption)

Optional. The trigger option for push events.

sensitiveQueryString

string

Optional. The sensitive query string to be appended to the target URI.

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.

PushOption

JSON representation
{
  "branchFilter": string
}
Fields
branchFilter

string

Optional. Trigger hook for matching branches only. Specified as glob pattern. If empty or , events for all branches are reported. Examples: main, {main,release}. See https://pkg.go.dev/github.com/gobwas/glob documentation.

HookEventType

Enums
UNSPECIFIED Unspecified.
PUSH Push events are triggered when pushing to the repository.
PULL_REQUEST Pull request events are triggered when a pull request is opened, closed, reopened, or edited.

Tool Annotations

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