## Tool: `list_instances`

Lists Secure Source Manager instances in the provided project and location.

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

| Curl Request |
|---|
| ```bash 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_instances", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' ``` |

## Input Schema

ListInstancesRequest is the request to list instances.

### ListInstancesRequest

| JSON representation |
|---|
| ``` { "parent": string, "pageSize": integer, "pageToken": string, "filter": string, "orderBy": string } ``` |

| Fields ||
|---|---|
| `parent` | `string` Required. Parent value for ListInstancesRequest. |
| `pageSize` | `integer` Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. |
| `pageToken` | `string` Optional. A token identifying a page of results the server should return. |
| `filter` | `string` Optional. Filter for filtering results. |
| `orderBy` | `string` Optional. Hint for how to order the results. |

## Output Schema

### ListInstancesResponse

| JSON representation |
|---|
| ``` { "instances": [ { object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.Instance`) } ], "nextPageToken": string, "unreachable": [ string ] } ``` |

| Fields ||
|---|---|
| `instances[]` | ``object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.Instance`)`` The list of instances. |
| `nextPageToken` | `string` A token identifying a page of results the server should return. |
| `unreachable[]` | `string` Locations that could not be reached. |

### Instance

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "privateConfig": { object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.PrivateConfig`) }, "state": enum (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.State`), "stateNote": enum (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.StateNote`), "kmsKey": string, "hostConfig": { object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.HostConfig`) }, "workforceIdentityFederationConfig": { object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.WorkforceIdentityFederationConfig`) }, "satisfiesPzi": boolean, "satisfiesPzs": boolean } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. A unique identifier for an instance. The name should be of the format: `projects/{project_number}/locations/{location_id}/instances/{instance_id}` `project_number`: Maps to a unique int64 id assigned to each project. `location_id`: Refers to the region where the instance will be deployed. Since Secure Source Manager is a regional service, it must be one of the valid GCP regions. `instance_id`: User provided name for the instance, must be unique for a project_number and location_id combination. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#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 (`https://protobuf.dev/reference/protobuf/google.protobuf#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"`. |
| `labels` | `map (key: string, value: string)` Optional. Labels as key value pairs. Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. For more information, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/best-practices-labels#label_encoding). An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `privateConfig` | ``object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.PrivateConfig`)`` Optional. Private settings for private instance. |
| `state` | ``enum (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.State`)`` Output only. Current state of the instance. |
| `stateNote` | ``enum (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.StateNote`)`` Output only. An optional field providing information about the current instance state. |
| `kmsKey` | `string` Optional. Immutable. Customer-managed encryption key name, in the format projects/\*/locations/\*/keyRings/\*/cryptoKeys/\*. |
| `hostConfig` | ``object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.HostConfig`)`` Output only. A list of hostnames for this instance. |
| `workforceIdentityFederationConfig` | ``object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.WorkforceIdentityFederationConfig`)`` Optional. Configuration for Workforce Identity Federation to support third party identity provider. If unset, defaults to the Google OIDC IdP. |
| `satisfiesPzi` | `boolean` Output only. Reserved for future use. |
| `satisfiesPzs` | `boolean` Output only. Reserved for future use. |

### Timestamp

| JSON representation |
|---|
| ``` { "seconds": string, "nanos": integer } ``` |

| Fields ||
|---|---|
| `seconds` | `string (https://developers.google.com/discovery/v1/type-format 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. |

### LabelsEntry

| JSON representation |
|---|
| ``` { "key": string, "value": string } ``` |

| Fields ||
|---|---|
| `key` | `string` |
| `value` | `string` |

### PrivateConfig

| JSON representation |
|---|
| ``` { "isPrivate": boolean, "caPool": string, "httpServiceAttachment": string, "sshServiceAttachment": string, "pscAllowedProjects": [ string ], "customHostConfig": { object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.CustomHostConfig`) } } ``` |

| Fields ||
|---|---|
| `isPrivate` | `boolean` Required. Immutable. Indicate if it's private instance. |
| `caPool` | `string` Optional. Immutable. CA pool resource, resource must in the format of `projects/{project}/locations/{location}/caPools/{ca_pool}`. |
| `httpServiceAttachment` | `string` Output only. Service Attachment for HTTP, resource is in the format of `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. |
| `sshServiceAttachment` | `string` Output only. Service Attachment for SSH, resource is in the format of `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`. |
| `pscAllowedProjects[]` | `string` Optional. Additional allowed projects for setting up PSC connections. Instance host project is automatically allowed and does not need to be included in this list. |
| `customHostConfig` | ``object (`https://docs.cloud.google.com/secure-source-manager/docs/reference/mcp/tools_list/get_instance#Output.Schema.CustomHostConfig`)`` Optional. Custom host config for the instance. |

### CustomHostConfig

| JSON representation |
|---|
| ``` { "html": string, "api": string, "gitSsh": string, "gitHttp": string } ``` |

| Fields ||
|---|---|
| `html` | `string` Required. The custom UI hostname for the instance, e.g., "git.source.internal.mycompany.com" |
| `api` | `string` Required. The custom API hostname for the instance, e.g., "api.source.internal.mycompany.com" |
| `gitSsh` | `string` Required. The custom git ssh hostname for the instance, e.g., "ssh.source.internal.mycompany.com" |
| `gitHttp` | `string` Required. The custom git http hostname for the instance, e.g., "git.source.internal.mycompany.com" |

### HostConfig

| JSON representation |
|---|
| ``` { "html": string, "api": string, "gitHttp": string, "gitSsh": string } ``` |

| Fields ||
|---|---|
| `html` | `string` Output only. HTML hostname. |
| `api` | `string` Output only. API hostname. |
| `gitHttp` | `string` Output only. Git HTTP hostname. |
| `gitSsh` | `string` Output only. Git SSH hostname. |

### WorkforceIdentityFederationConfig

| JSON representation |
|---|
| ``` { "enabled": boolean } ``` |

| Fields ||
|---|---|
| `enabled` | `boolean` Optional. Immutable. Whether Workforce Identity Federation is enabled. |

### State

Secure Source Manager instance state.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Not set. This should only be the case for incoming requests. |
| `CREATING` | Instance is being created. |
| `ACTIVE` | Instance is ready. |
| `DELETING` | Instance is being deleted. |
| `PAUSED` | Instance is paused. |
| `UNKNOWN` | Instance is unknown, we are not sure if it's functioning. |

### StateNote

Provides information about the current instance state.

| Enums ||
|---|---|
| `STATE_NOTE_UNSPECIFIED` | STATE_NOTE_UNSPECIFIED as the first value of State. |
| `PAUSED_CMEK_UNAVAILABLE` | CMEK access is unavailable. |
| `INSTANCE_RESUMING` | INSTANCE_RESUMING indicates that the instance was previously paused and is under the process of being brought back. |

### Tool Annotations

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