### Create a New Collection Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Create a new collection with specified schema using Quick Setup. Supports configurable dimensions, metric types, and field names. This example demonstrates a basic collection with COSINE similarity. ```python # MCP Tool Call - Basic collection with COSINE similarity result = await create_collection( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", dimension=768, # Vector dimension (e.g., 768 for BERT embeddings) metric_type="COSINE", # Options: L2, IP, COSINE id_type="Int64", # Options: Int64, VarChar auto_id=True, primary_field_name="id", vector_field_name="vector" ) ``` -------------------------------- ### Verify uv Installation Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/docs/USERGUIDE.md Confirm that the 'uv' command-line tool is installed and accessible in your system's PATH. ```bash uv --version ``` -------------------------------- ### create_collection Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Create a new collection with specified schema using Quick Setup. ```APIDOC ## create_collection ### Description Create a new collection with specified schema using Quick Setup. Supports configurable dimensions, metric types, and field names. ### Parameters #### Request Body - **cluster_id** (string) - Required - **collection_name** (string) - Required - **dimension** (integer) - Required - **metric_type** (string) - Required - **id_type** (string) - Required - **auto_id** (boolean) - Required - **primary_field_name** (string) - Required - **vector_field_name** (string) - Required ``` -------------------------------- ### Clone and Setup Zilliz MCP Server Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/README.md Commands to clone the repository and prepare the environment configuration. ```bash git clone https://github.com/zilliztech/zilliz-mcp-server.git cd zilliz-mcp-server ``` ```bash cp example.env .env ``` -------------------------------- ### Clone and Run HTTP Server Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Clone the repository, set up environment variables, and start the Zilliz MCP Server as a standalone HTTP service. ```bash # Clone the repository git clone https://github.com/zilliztech/zilliz-mcp-server.git cd zilliz-mcp-server # Create environment file cp example.env .env # Edit .env and add: ZILLIZ_API_KEY="your_api_key_here" # Start HTTP server uv run src/zilliz_mcp_server/server.py --transport streamable-http ``` -------------------------------- ### Start MCP Server as HTTP Service Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/README.md Execute the server using the streamable-http transport mode. ```bash uv run src/zilliz_mcp_server/server.py --transport streamable-http ``` -------------------------------- ### Verify Python Version Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/docs/USERGUIDE.md Check if your Python installation meets the minimum version requirement of 3.10. ```bash python --version ``` -------------------------------- ### Mock External Dependencies in Tests Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/TESTING.md Example of using patch to mock the openapi_client for testing tool functionality. ```python @patch('zilliz_mcp_server.tools.zilliz.zilliz_tools.openapi_client') async def test_list_projects_success(self, mock_client, sample_project_response): mock_client.control_plane_api_request.return_value = sample_project_response # Test implementation... ``` -------------------------------- ### Query Entities with Pagination Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Perform queries with pagination to retrieve entities in batches. Specify limit and offset for controlling the number of results and their starting point. ```python result = await query( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", filter="id in [1, 2, 3, 4, 5]", output_fields=["product_name", "vector"], limit=10, offset=0 ) ``` -------------------------------- ### Configure API Key Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/README.md Add the Zilliz Cloud API key to the .env file. ```text ZILLIZ_API_KEY="your_api_key_here" ``` -------------------------------- ### List Projects using MCP Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Call the `list_projects` tool to retrieve a list of all projects associated with your Zilliz Cloud API Key. The response includes project details like name, ID, instance count, and creation time. ```python # MCP Tool Call result = await list_projects() # Expected Response [ { "project_name": "Default Project", "project_id": "proj-f5b02814db7ccfe2d16293", "instance_count": 2, "create_time": "2023-06-14T06:59:07Z" }, { "project_name": "Production", "project_id": "proj-a1b2c3d4e5f6g7h8i9j0", "instance_count": 5, "create_time": "2024-01-15T10:30:00Z" } ] ``` -------------------------------- ### Test ZillizConfig with Valid Environment Variables Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/TESTING.md Tests the initialization of ZillizConfig using valid environment variables. Ensure that the configuration is loaded correctly. ```python def test_init_with_valid_env_vars(self, mock_env_vars): with patch.dict(os.environ, mock_env_vars, clear=True): config = ZillizConfig() assert config.token == "test-token-123" ``` -------------------------------- ### MCP Client Configuration Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Configure your MCP client to connect to the Zilliz MCP Server. Ensure your ZILLIZ_CLOUD_TOKEN is set in the environment. ```json { "mcpServers": { "zilliz-mcp-server": { "command": "uvx", "args": ["zilliz-mcp-server"], "env": { "ZILLIZ_CLOUD_TOKEN": "your-api-token-here" } } } } ``` -------------------------------- ### Enable Asyncio for Tests Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/TESTING.md Configuration marker to enable asyncio support for all tests within a module. ```python # Enable asyncio for all async tests in a module pytestmark = pytest.mark.asyncio ``` -------------------------------- ### Clone Zilliz MCP Server Project Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/docs/USERGUIDE.md Clone the Zilliz MCP Server repository and navigate into the project directory. ```bash git clone https://github.com/zilliztech/zilliz-mcp-server.git cd zilliz-mcp-server ``` -------------------------------- ### Execute Test Commands Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/TESTING.md Commands for running the full test suite or specific test categories using uv. ```bash # Run all tests ./run_tests.sh # Or manually: uv run pytest tests/unit/ -v ``` ```bash # Configuration tests only uv run pytest tests/unit/test_settings.py -v # HTTP client tests only uv run pytest tests/unit/test_openapi_client.py -v # API tools tests only uv run pytest tests/unit/tools/ -v # Run tests with coverage uv add pytest-cov uv run pytest tests/unit/ --cov=src/zilliz_mcp_server --cov-report=html ``` -------------------------------- ### Configure MCP Client Connection Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/README.md JSON configuration for connecting an MCP client to the running server. ```json { "mcpServers": { "zilliz-mcp-server": { "url": "http://localhost:8000/mcp", "transport": "streamable-http", "description": "Zilliz Cloud and Milvus MCP Server" } } } ``` -------------------------------- ### Create Free Tier Cluster using MCP Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Use the `create_free_cluster` tool to provision a new free-tier Milvus cluster. Requires a cluster name and project ID. The region is set by the `ZILLIZ_CLOUD_FREE_CLUSTER_REGION` environment variable. ```python # MCP Tool Call result = await create_free_cluster( cluster_name="my-test-cluster", project_id="proj-f5b02814db7ccfe2d16293" ) # Expected Response { "cluster_id": "inxx-abc123def456", "username": "db_admin_user", "prompt": "successfully submitted, cluster is being created..." } ``` -------------------------------- ### Configure mcp.json for Cursor Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/docs/USERGUIDE.md Add the Zilliz MCP Server configuration to your Cursor editor's mcp.json file. Ensure you replace 'your-token-here' with your actual Zilliz API key. ```json { "mcpServers": { "zilliz-mcp-server": { "command": "uvx", "args": ["zilliz-mcp-server"], "env": { "ZILLIZ_CLOUD_TOKEN": "your-token-here" } } } } ``` -------------------------------- ### Create Collection with VarChar Primary Key Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Use this to create a new collection with a VarChar primary key. Ensure the dimension matches your embedding model. ```python result = await create_collection( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="document_store", dimension=1536, # OpenAI embedding dimension metric_type="IP", # Inner Product id_type="VarChar", auto_id=False, primary_field_name="doc_id", vector_field_name="embedding" ) ``` -------------------------------- ### Environment Variables for Zilliz MCP Server Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Configure Zilliz MCP Server behavior using environment variables. Required variables include ZILLIZ_CLOUD_TOKEN for authentication. ```bash # Required: Zilliz Cloud API Token ZILLIZ_CLOUD_TOKEN="your-api-token" # Optional: Zilliz Cloud API endpoint (default: https://api.cloud.zilliz.com) ZILLIZ_CLOUD_URI="https://api.cloud.zilliz.com" # Optional: Default region for free cluster creation (default: gcp-us-west1) ZILLIZ_CLOUD_FREE_CLUSTER_REGION="gcp-us-west1" # Optional: MCP server configuration MCP_SERVER_HOST="localhost" MCP_SERVER_PORT=8000 ``` -------------------------------- ### List Clusters with Pagination using MCP Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Call the `list_clusters` tool with pagination parameters to retrieve cluster details. This includes cluster ID, name, status, connection address, and plan type. ```python # MCP Tool Call with pagination result = await list_clusters(page_size=10, current_page=1) # Expected Response [ { "cluster_id": "inxx-xxxxxxxxxxxxxxx", "cluster_name": "dedicated-3", "description": "Production vector search cluster", "region_id": "aws-us-west-2", "plan": "Standard", "cu_type": "Performance-optimized", "cu_size": 1, "status": "RUNNING", "connect_address": "https://inxx-xxxxxxxxxxxxxxx.aws-us-west-2.vectordb.zillizcloud.com:19530", "private_link_address": "", "project_id": "proj-xxxxxxxxxxxxxxxxxxxxxx", "create_time": "2024-06-30T16:49:50Z" } ] ``` -------------------------------- ### Basic Vector Search with MCP Tool Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Perform a basic vector search to find similar items. Specify cluster, region, endpoint, collection, query data, and desired output fields. ```python result = await search( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", data=[[0.1, 0.2, 0.3, ...]], # Query vector(s) anns_field="vector", limit=10, output_fields=["product_name", "category", "price"] ) ``` -------------------------------- ### create_free_cluster Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Creates a new free-tier Milvus cluster in Zilliz Cloud. ```APIDOC ## create_free_cluster ### Description Create a new free-tier Milvus cluster in Zilliz Cloud. Requires a cluster name and project ID. ### Parameters #### Request Body - **cluster_name** (string) - Required - Name for the new cluster - **project_id** (string) - Required - ID of the project to host the cluster ### Response #### Success Response (200) - **cluster_id** (string) - ID of the created cluster - **username** (string) - Admin username for the cluster - **prompt** (string) - Status message ### Response Example { "cluster_id": "inxx-abc123def456", "username": "db_admin_user", "prompt": "successfully submitted, cluster is being created..." } ``` -------------------------------- ### list_projects Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Retrieves a list of all projects associated with the provided API Key. ```APIDOC ## list_projects ### Description List all projects scoped to your API Key in Zilliz Cloud. Returns project names, IDs, instance counts, and creation timestamps. ### Response #### Success Response (200) - **project_name** (string) - Name of the project - **project_id** (string) - Unique identifier for the project - **instance_count** (integer) - Number of instances in the project - **create_time** (string) - ISO 8601 timestamp of creation ### Response Example [ { "project_name": "Default Project", "project_id": "proj-f5b02814db7ccfe2d16293", "instance_count": 2, "create_time": "2023-06-14T06:59:07Z" } ] ``` -------------------------------- ### Vector Search with Pagination and Grouping Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Implement pagination and grouping in vector search to manage large result sets and categorize findings. Use offset for pagination and grouping_field for categorization. ```python result = await search( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", data=[[0.1, 0.2, 0.3, ...]], anns_field="vector", limit=10, offset=20, grouping_field="category", output_fields=["product_name", "category"], consistency_level="Strong" ) ``` -------------------------------- ### Create Collection with VarChar Primary Key Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt This endpoint allows the creation of a new collection with a specified VarChar primary key. It configures collection properties such as dimension, metric type, and field names for IDs and vectors. ```APIDOC ## POST /api/collections/create ### Description Creates a new collection with a VarChar primary key. ### Method POST ### Endpoint /api/collections/create ### Parameters #### Request Body - **cluster_id** (string) - Required - The ID of the Zilliz cluster. - **region_id** (string) - Required - The region where the cluster is located. - **endpoint** (string) - Required - The API endpoint for the Zilliz cluster. - **collection_name** (string) - Required - The name of the collection to create. - **dimension** (integer) - Required - The dimension of the vector embeddings. - **metric_type** (string) - Required - The similarity metric type (e.g., IP, L2, COSINE). - **id_type** (string) - Required - The data type of the primary key (e.g., VarChar, Int64). - **auto_id** (boolean) - Required - Whether to automatically generate IDs. - **primary_field_name** (string) - Required - The name of the primary key field. - **vector_field_name** (string) - Required - The name of the vector field. ### Request Example ```json { "cluster_id": "inxx-xxxxxxxxxxxxxxx", "region_id": "gcp-us-west1", "endpoint": "https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", "collection_name": "document_store", "dimension": 1536, "metric_type": "IP", "id_type": "VarChar", "auto_id": false, "primary_field_name": "doc_id", "vector_field_name": "embedding" } ``` ### Response #### Success Response (200) - **code** (integer) - The status code of the operation. - **data** (object) - An empty object upon successful creation. #### Response Example ```json { "code": 0, "data": {} } ``` ``` -------------------------------- ### Describe Collection Details Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Retrieve detailed information about an existing collection, including its schema, fields, and load status. The `db_name` is optional for free/serverless clusters. ```python result = await describe_collection( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", db_name="" # Optional for free/serverless clusters ) ``` -------------------------------- ### Project Test Directory Structure Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/TESTING.md Visual representation of the test suite organization within the repository. ```text tests/ ├── __init__.py ├── conftest.py # pytest configuration and shared fixtures ├── pytest.ini # pytest settings ├── unit/ │ ├── __init__.py │ ├── test_settings.py # Configuration validation tests (12 tests) │ ├── test_openapi_client.py # HTTP client tests (23 tests) │ └── tools/ │ ├── __init__.py │ ├── test_zilliz_tools.py # Zilliz Cloud API tests (12 tests) │ └── test_milvus_tools.py # Milvus data operations tests (15 tests) ``` -------------------------------- ### resume_cluster Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Resume a suspended dedicated cluster. The cluster will take several minutes to become available. ```APIDOC ## resume_cluster ### Description Resume a suspended dedicated cluster. The cluster will take several minutes to become available. ### Parameters #### Request Body - **cluster_id** (string) - Required - The ID of the cluster to resume. ### Request Example { "cluster_id": "inxx-xxxxxxxxxxxxxxx" } ### Response #### Success Response (200) - **cluster_id** (string) - The ID of the cluster. - **prompt** (string) - Status update message. #### Response Example { "cluster_id": "inxx-xxxxxxxxxxxxxxx", "prompt": "successfully Submitted. Cluster is being resumed, which is expected to takes several minutes." } ``` -------------------------------- ### Describe Cluster using MCP Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Call the `describe_cluster` tool with a specific `cluster_id` to retrieve detailed information about a Milvus cluster, including its status, connection details, and storage information. ```python # MCP Tool Call result = await describe_cluster(cluster_id="inxx-xxxxxxxxxxxxxxx") ``` -------------------------------- ### List Databases in a Cluster Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt List all databases within a specific cluster. This function returns an array of database names. ```python # MCP Tool Call result = await list_databases( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com" ) ``` -------------------------------- ### list_databases Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt List all databases within a specific cluster. ```APIDOC ## list_databases ### Description List all databases within a specific cluster. Returns an array of database names. ### Parameters #### Request Body - **cluster_id** (string) - Required - **region_id** (string) - Required - **endpoint** (string) - Required ### Response #### Success Response (200) - **databases** (array) - List of database names. ``` -------------------------------- ### Zilliz Control Plane Tools Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/README.md Tools for managing Zilliz Cloud resources such as projects and clusters. ```APIDOC ## Zilliz Control Plane Tools ### Description These tools allow AI agents to manage Zilliz Cloud infrastructure. ### Available Tools - **list_projects**: List all projects in your Zilliz Cloud account. - **list_clusters**: List all clusters within your projects. - **create_free_cluster**: Create a new, free-tier Milvus cluster. - **describe_cluster**: Get detailed information about a specific cluster. - **suspend_cluster**: Suspend a running cluster to save costs. - **resume_cluster**: Resume a suspended cluster. - **query_cluster_metrics**: Query various performance metrics for a cluster. ``` -------------------------------- ### Test ZillizConfig with Invalid Port Range Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/TESTING.md Tests the exception handling for an invalid port range when initializing ZillizConfig. This ensures that the port number is validated correctly. ```python def test_invalid_port_range(self): env_vars = {"ZILLIZ_CLOUD_TOKEN": "test-token", "MCP_SERVER_PORT": "99999"} with patch.dict(os.environ, env_vars, clear=True): with pytest.raises(ValueError, match="MCP_SERVER_PORT must be between 1 and 65535"): ZillizConfig() ``` -------------------------------- ### List Collections in a Database Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt List all collection names within a specified database. This function returns an array of collection names. The `db_name` parameter is optional for free/serverless clusters. ```python # MCP Tool Call result = await list_collections( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", db_name="default" # Optional for free/serverless clusters ) ``` -------------------------------- ### list_clusters Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Lists all clusters scoped to the API Key with support for pagination. ```APIDOC ## list_clusters ### Description List all clusters scoped to your API Key with pagination support. Returns cluster details including status, connection address, plan type, and compute unit information. ### Parameters #### Query Parameters - **page_size** (integer) - Optional - Number of items per page - **current_page** (integer) - Optional - Current page number ### Response #### Success Response (200) - **cluster_id** (string) - Unique identifier for the cluster - **cluster_name** (string) - Name of the cluster - **status** (string) - Current status of the cluster - **connect_address** (string) - Connection URL for the cluster ### Response Example [ { "cluster_id": "inxx-xxxxxxxxxxxxxxx", "cluster_name": "dedicated-3", "status": "RUNNING", "connect_address": "https://inxx-xxxxxxxxxxxxxxx.aws-us-west-2.vectordb.zillizcloud.com:19530" } ] ``` -------------------------------- ### Milvus Data Plane Tools Source: https://github.com/zilliztech/zilliz-mcp-server/blob/master/README.md Tools for interacting with data stored within a Milvus cluster. ```APIDOC ## Milvus Data Plane Tools ### Description These tools enable data operations within Milvus collections. ### Available Tools - **list_databases**: List all databases within a specific cluster. - **list_collections**: List all collections within a database. - **create_collection**: Create a new collection with a specified schema. - **describe_collection**: Get detailed information about a collection, including its schema. - **insert_entities**: Insert entities (data records with vectors) into a collection. - **delete_entities**: Delete entities from a collection based on IDs or a filter expression. - **search**: Perform a vector similarity search on a collection. - **query**: Query entities based on a scalar filter expression. - **hybrid_search**: Perform a hybrid search combining vector similarity and scalar filters. ``` -------------------------------- ### Resume a Suspended Cluster Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Use this function to resume a suspended dedicated cluster. The cluster may take several minutes to become fully available. ```python # MCP Tool Call result = await resume_cluster(cluster_id="inxx-xxxxxxxxxxxxxxx") ``` -------------------------------- ### list_collections Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt List all collection names within a database. ```APIDOC ## list_collections ### Description List all collection names within a database. Returns an array of collection names for the specified database. ### Parameters #### Request Body - **cluster_id** (string) - Required - **region_id** (string) - Required - **endpoint** (string) - Required - **db_name** (string) - Optional ### Response #### Success Response (200) - **collections** (array) - List of collection names. ``` -------------------------------- ### Describe Collection Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Retrieves detailed information about a specified collection, including its schema, fields, indexes, and current load state. ```APIDOC ## GET /api/collections/describe ### Description Gets detailed information about a collection including its schema, fields, indexes, and load state. ### Method GET ### Endpoint /api/collections/describe ### Parameters #### Query Parameters - **cluster_id** (string) - Required - The ID of the Zilliz cluster. - **region_id** (string) - Required - The region where the cluster is located. - **endpoint** (string) - Required - The API endpoint for the Zilliz cluster. - **collection_name** (string) - Required - The name of the collection to describe. - **db_name** (string) - Optional - The name of the database (if applicable). ### Response #### Success Response (200) - **code** (integer) - The status code of the operation. - **data** (object) - An object containing detailed information about the collection. - **aliases** (array) - Aliases associated with the collection. - **autoId** (boolean) - Indicates if auto-ID is enabled. - **collectionID** (integer) - The unique identifier for the collection. - **collectionName** (string) - The name of the collection. - **consistencyLevel** (string) - The consistency level of the collection. - **description** (string) - A description of the collection. - **enableDynamicField** (boolean) - Indicates if dynamic fields are enabled. - **fields** (array) - An array of field objects, each describing a field in the collection. - **indexes** (array) - An array of index objects, describing the indexes on the collection. - **load** (string) - The current load state of the collection (e.g., LoadStateLoaded). - **partitionsNum** (integer) - The number of partitions in the collection. - **properties** (array) - Properties associated with the collection. #### Response Example ```json { "code": 0, "data": { "aliases": [], "autoId": true, "collectionID": 448707763883002000, "collectionName": "product_embeddings", "consistencyLevel": "Bounded", "description": "", "enableDynamicField": true, "fields": [ { "autoId": true, "description": "", "id": 100, "name": "id", "partitionKey": false, "primaryKey": true, "type": "Int64" }, { "autoId": false, "description": "", "id": 101, "name": "vector", "params": [{"key": "dim", "value": "768"}], "partitionKey": false, "primaryKey": false, "type": "FloatVector" } ], "indexes": [ { "fieldName": "vector", "indexName": "vector", "metricType": "COSINE" } ], "load": "LoadStateLoaded", "partitionsNum": 1, "properties": [] } } ``` ``` -------------------------------- ### Query Cluster Performance Metrics Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Query performance metrics for a specific cluster. You can specify a time period or a specific time range, along with desired metrics and statistics. ```python # MCP Tool Call - Query metrics for the last hour result = await query_cluster_metrics( cluster_id="inxx-xxxxxxxxxxxxxxx", period="PT1H", # ISO 8601 duration: 1 hour granularity="PT30S", # 30-second intervals metric_queries=[ {"metricName": "CU_COMPUTATION", "stat": "AVG"}, {"metricName": "REQ_SEARCH_COUNT", "stat": "AVG"}, {"metricName": "REQ_SEARCH_LATENCY_P99", "stat": "P99"}, {"metricName": "STORAGE_USE", "stat": "AVG"} ] ) ``` ```python # Alternative: Query with specific time range result = await query_cluster_metrics( cluster_id="inxx-xxxxxxxxxxxxxxx", start="2024-06-30T15:00:00Z", end="2024-06-30T16:00:00Z", granularity="PT1M", metric_queries=[ {"metricName": "ENTITIES_COUNT", "stat": "AVG"}, {"metricName": "COLLECTIONS_COUNT", "stat": "AVG"} ] ) ``` -------------------------------- ### describe_cluster Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Retrieves detailed information about a specific cluster. ```APIDOC ## describe_cluster ### Description Get detailed information about a specific cluster including status, connection address, storage size, and creation progress. ### Parameters #### Request Body - **cluster_id** (string) - Required - The ID of the cluster to describe ``` -------------------------------- ### Hybrid Search with RRF Reranking Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Execute a hybrid search combining multiple vector similarity searches and rerank results using Reciprocal Rank Fusion (RRF). Configure search requests and RRF parameters. ```python result = await hybrid_search( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="multi_vector_collection", search_requests=[ { "data": [[0.1, 0.2, 0.3, ...]], # Text embedding "annsField": "text_vector", "limit": 20, "metricType": "COSINE" }, { "data": [[0.4, 0.5, 0.6, ...]], # Image embedding "annsField": "image_vector", "limit": 20, "metricType": "COSINE" } ], rerank_strategy="rrf", rerank_params={"k": 60}, # RRF constant limit=10, output_fields=["title", "description", "image_url"] ) ``` -------------------------------- ### Hybrid Search with Weighted Reranking Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Perform a hybrid search with weighted reranking, assigning specific weights to different vector types (e.g., dense and sparse). Supports filtering within search requests. ```python result = await hybrid_search( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="multi_vector_collection", search_requests=[ { "data": [[0.1, 0.2, 0.3, ...]], "annsField": "dense_vector", "limit": 50, "filter": "category == 'Books'" }, { "data": [[0.4, 0.5, 0.6, ...]], "annsField": "sparse_vector", "limit": 50 } ], rerank_strategy="weighted", rerank_params={"weights": [0.7, 0.3]}, # 70% dense, 30% sparse limit=10, output_fields=["title", "author", "price"], consistency_level="Bounded" ) ``` -------------------------------- ### Suspend a Dedicated Cluster Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Use this function to suspend a dedicated cluster to reduce costs. The cluster will only incur storage costs while suspended. ```python # MCP Tool Call result = await suspend_cluster(cluster_id="inxx-xxxxxxxxxxxxxxx") ``` -------------------------------- ### query_cluster_metrics Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Query performance metrics for a specific cluster including CPU computation, storage usage, request counts, and latency statistics. ```APIDOC ## query_cluster_metrics ### Description Query performance metrics for a specific cluster including CPU computation, storage usage, request counts, and latency statistics. ### Parameters #### Request Body - **cluster_id** (string) - Required - The ID of the cluster. - **period** (string) - Optional - ISO 8601 duration (e.g., PT1H). - **start** (string) - Optional - Start timestamp. - **end** (string) - Optional - End timestamp. - **granularity** (string) - Required - Time interval (e.g., PT30S). - **metric_queries** (array) - Required - List of metrics to query. ### Response #### Success Response (200) - **code** (integer) - Status code. - **data** (object) - Metric results. ``` -------------------------------- ### Insert Entities Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Inserts data entities into a specified collection. This operation supports inserting a single entity or multiple entities in a batch. ```APIDOC ## POST /api/collections/insert ### Description Insert data entities into a collection. Supports single entity or batch insertion. ### Method POST ### Endpoint /api/collections/insert ### Parameters #### Request Body - **cluster_id** (string) - Required - The ID of the Zilliz cluster. - **region_id** (string) - Required - The region where the cluster is located. - **endpoint** (string) - Required - The API endpoint for the Zilliz cluster. - **collection_name** (string) - Required - The name of the collection to insert data into. - **data** (object|array) - Required - The data to insert. Can be a single entity object or an array of entity objects. - **db_name** (string) - Optional - The name of the database (if applicable). ### Request Example (Batch Insertion) ```json { "cluster_id": "inxx-xxxxxxxxxxxxxxx", "region_id": "gcp-us-west1", "endpoint": "https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", "collection_name": "product_embeddings", "data": [ { "vector": [0.1, 0.2, 0.3, ...], "product_name": "Wireless Headphones", "category": "Electronics", "price": 99.99 }, { "vector": [0.4, 0.5, 0.6, ...], "product_name": "Laptop Stand", "category": "Accessories", "price": 49.99 } ], "db_name": "" } ``` ### Request Example (Single Entity Insertion) ```json { "cluster_id": "inxx-xxxxxxxxxxxxxxx", "region_id": "gcp-us-west1", "endpoint": "https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", "collection_name": "product_embeddings", "data": { "vector": [0.7, 0.8, 0.9, ...], "product_name": "USB Cable", "category": "Accessories", "price": 9.99 } } ``` ### Response #### Success Response (200) - **code** (integer) - The status code of the operation. - **data** (object) - An object containing information about the insertion. - **insertCount** (integer) - The number of entities successfully inserted. - **insertIds** (array) - An array of IDs for the inserted entities. #### Response Example ```json { "code": 0, "data": { "insertCount": 2, "insertIds": [448300048035776800, 448300048035776801] } } ``` ``` -------------------------------- ### Insert Entities into Collection Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Insert data entities into a collection. Supports both single entity and batch insertion. Automatic ID generation is used if `auto_id` is true during collection creation. ```python # MCP Tool Call - Insert multiple entities result = await insert_entities( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", data=[ { "vector": [0.1, 0.2, 0.3, ...], # 768-dimensional vector "product_name": "Wireless Headphones", "category": "Electronics", "price": 99.99 }, { "vector": [0.4, 0.5, 0.6, ...], "product_name": "Laptop Stand", "category": "Accessories", "price": 49.99 } ], db_name="" # Optional for free/serverless clusters ) ``` ```python # MCP Tool Call - Insert single entity result = await insert_entities( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", data={ "vector": [0.7, 0.8, 0.9, ...], "product_name": "USB Cable", "category": "Accessories", "price": 9.99 } ) ``` -------------------------------- ### Vector Search with Scalar Filter Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Enhance vector search by applying scalar filters to narrow down results based on metadata. Supports conditions on fields like category and price. ```python result = await search( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", data=[[0.1, 0.2, 0.3, ...]], anns_field="vector", limit=5, filter="category == 'Electronics' and price < 100", output_fields=["product_name", "category", "price"], metric_type="COSINE" ) ``` -------------------------------- ### Query Entities by Scalar Filter Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Retrieve entities based on scalar filter expressions without vector similarity. Useful for metadata-driven lookups. ```python result = await query( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", filter="category == 'Electronics' and price > 50", output_fields=["product_name", "category", "price"], limit=100 ) ``` -------------------------------- ### suspend_cluster Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Suspend a dedicated cluster to save costs. The cluster will not incur computing costs when suspended—only storage costs apply. ```APIDOC ## suspend_cluster ### Description Suspend a dedicated cluster to save costs. The cluster will not incur computing costs when suspended—only storage costs apply. ### Parameters #### Request Body - **cluster_id** (string) - Required - The ID of the cluster to suspend. ### Request Example { "cluster_id": "inxx-xxxxxxxxxxxxxxx" } ### Response #### Success Response (200) - **cluster_id** (string) - The ID of the cluster. - **prompt** (string) - Confirmation message. #### Response Example { "cluster_id": "inxx-xxxxxxxxxxxxxxx", "prompt": "Successfully Submitted. The cluster will not incur any computing costs when suspended. You will only be billed for the storage costs during this time." } ``` -------------------------------- ### Search Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Performs a vector similarity search on a collection. This operation allows for optional scalar filtering and returns the most similar entities based on vector distance. ```APIDOC ## POST /api/collections/search ### Description Perform vector similarity search on a collection with optional scalar filtering. Returns the most similar entities based on vector distance. ### Method POST ### Endpoint /api/collections/search ### Parameters #### Request Body - **cluster_id** (string) - Required - The ID of the Zilliz cluster. - **region_id** (string) - Required - The region where the cluster is located. - **endpoint** (string) - Required - The API endpoint for the Zilliz cluster. - **collection_name** (string) - Required - The name of the collection to search within. - **query_vectors** (array) - Required - An array of query vectors for the search. - **limit** (integer) - Required - The maximum number of results to return. - **filter** (string) - Optional - A filter expression to apply to the search. - **output_fields** (array) - Optional - A list of fields to include in the search results. - **params** (object) - Optional - Search parameters, such as "metric_type" and "params" for index. ### Request Example ```json { "cluster_id": "inxx-xxxxxxxxxxxxxxx", "region_id": "gcp-us-west1", "endpoint": "https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", "collection_name": "product_embeddings", "query_vectors": [ [0.1, 0.2, 0.3, ...] ], "limit": 10, "filter": "price > 50", "output_fields": ["product_name", "price"], "params": { "metric_type": "COSINE", "params": {"radius": 0.5} } } ``` ### Response #### Success Response (200) - **code** (integer) - The status code of the operation. - **data** (object) - An object containing the search results. - **results** (array) - An array of search result objects, each containing matched entities and their scores. #### Response Example ```json { "code": 0, "data": { "results": [ { "entities": [ { "product_name": "Wireless Headphones", "price": 99.99, "vector": [0.1, 0.2, 0.3, ...] } ], "score": 0.95 } ] } } ``` ``` -------------------------------- ### Delete Entities from Collection Source: https://context7.com/zilliztech/zilliz-mcp-server/llms.txt Delete entities from a collection using filter expressions or primary key conditions. You can also specify a partition name to delete from a specific partition. ```python # MCP Tool Call - Delete by filter expression result = await delete_entities( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", filter="category == 'Discontinued'", db_name="" ) ``` ```python # MCP Tool Call - Delete by primary key result = await delete_entities( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", filter="id in [448300048035776800, 448300048035776801]" ) ``` ```python # MCP Tool Call - Delete from specific partition result = await delete_entities( cluster_id="inxx-xxxxxxxxxxxxxxx", region_id="gcp-us-west1", endpoint="https://inxx-xxxxxxxxxxxxxxx.api.gcp-us-west1.zillizcloud.com", collection_name="product_embeddings", filter="price < 10", partition_name="low_value_products" ) ```