Tool: list_indexes
Lists all indexes within a specific collection.
The following code sample shows how to use curl to call the list_indexes MCP tool.
| Curl Request |
|---|
curl --location 'https://vectorsearch.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_indexes", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Message for requesting list of Indexes
ListIndexesRequest
| JSON representation |
|---|
{ "parent": string, "pageSize": integer, "pageToken": string, "filter": string, "orderBy": string } |
| Fields | |
|---|---|
parent |
Required. Parent value for ListIndexesRequest |
pageSize |
Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. |
pageToken |
Optional. A token identifying a page of results the server should return. |
filter |
Optional. Filtering results |
orderBy |
Optional. Hint for how to order the results |
Output Schema
Message for response to listing Indexes
ListIndexesResponse
| JSON representation |
|---|
{
"indexes": [
{
object ( |
| Fields | |
|---|---|
indexes[] |
The list of Index |
nextPageToken |
A token identifying a page of results the server should return. |
Index
| JSON representation |
|---|
{ "name": string, "displayName": string, "description": string, "labels": { string: string, ... }, "createTime": string, "updateTime": string, "distanceMetric": enum ( |
| Fields | |
|---|---|
name |
Identifier. name of resource |
displayName |
Optional. User-specified display name of the index |
description |
Optional. User-specified description of the index |
labels |
Optional. Labels as key value pairs. An object containing a list of |
createTime |
Output only. [Output only] Create time stamp 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. [Output only] Update time stamp 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: |
distanceMetric |
Optional. Distance metric used for indexing. If not specified, will default to DOT_PRODUCT. |
indexField |
Required. The collection schema field to index. |
filterFields[] |
Optional. The fields to push into the index to enable fast ANN inline filtering. |
storeFields[] |
Optional. The fields to push into the index to enable inline data retrieval. |
Union field infra_type. The infrastructure type of the index. infra_type can be only one of the following: |
|
dedicatedInfrastructure |
Optional. Dedicated infrastructure for the index. |
Union field index_type. The type of the index. index_type can be only one of the following: |
|
denseScann |
Optional. Dense ScaNN index. |
DedicatedInfrastructure
| JSON representation |
|---|
{ "autoscalingSpec": { object ( |
| Fields | |
|---|---|
autoscalingSpec |
Optional. Autoscaling specification. |
Union field
|
|
mode |
Optional. Mode of the dedicated infrastructure. |
AutoscalingSpec
| JSON representation |
|---|
{ "minReplicaCount": integer, "maxReplicaCount": integer } |
| Fields | |
|---|---|
minReplicaCount |
Optional. The minimum number of replicas. If not set or set to |
maxReplicaCount |
Optional. The maximum number of replicas. Must be >= |
DenseScannIndex
| JSON representation |
|---|
{
"featureNormType": enum ( |
| Fields | |
|---|---|
featureNormType |
Optional. Feature norm type. |
LabelsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
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. |
Mode
Mode of the dedicated infrastructure.
| Enums | |
|---|---|
MODE_UNSPECIFIED |
Default will use PERFORMANCE_OPTIMIZED. |
STORAGE_OPTIMIZED |
This is storage optimized variation. |
PERFORMANCE_OPTIMIZED |
This is Performance optimized on E2 or equivalent family. |
FeatureNormType
Feature norm type for ScaNN index.
| Enums | |
|---|---|
FEATURE_NORM_TYPE_UNSPECIFIED |
Unspecified feature norm type. |
NONE |
No norm applied. |
UNIT_L2_NORM |
Unit L2 norm. |
DistanceMetric
Distance metric for vector search.
| Enums | |
|---|---|
DISTANCE_METRIC_UNSPECIFIED |
Default value, distance metric is not specified. |
DOT_PRODUCT |
Dot product distance metric. |
COSINE_DISTANCE |
Cosine distance metric. |
Tool Annotations
Tool annotations are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.
Along with the title string, the following boolean hints are defined as follows:
readOnlyHint: If true, the tool doesn't modify its environment. Default: false.destructiveHint: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.idempotentHint: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.openWorldHint: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌