### Conventional Commit Example - Text Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md An example demonstrating the Conventional Commits format for commit messages, including type, scope, description, body, and footer. ```text [optional scope]: [optional body] [optional footer(s)] ``` -------------------------------- ### Table-Driven Test Example - Go Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md An example of a table-driven unit test in Go, demonstrating how to test a function with various inputs and expected outputs. Requires Go testing package. ```go func TestNewTool(t *testing.T) { tests := []struct { name string input string expected string wantErr bool }{ { name: "valid input", input: "test", expected: "test_result", wantErr: false, }, // More test cases... } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { result, err := NewTool(tt.input) if tt.wantErr { assert.Error(t, err) return } assert.NoError(t, err) assert.Equal(t, tt.expected, result) }) } } ``` -------------------------------- ### Install from Source using Make Source: https://github.com/tailabs/mcp-milvus/blob/master/README.md Installs the MCP Milvus project from source using the provided Makefile. This process includes fetching dependencies and building the binary. Requires Go 1.24+ and a running Milvus instance. ```bash git clone https://github.com/tailabs/mcp-milvus.git cd mcp-milvus make deps make build ``` -------------------------------- ### Pull Request Template Example Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md This markdown snippet represents the template used for submitting pull requests. It guides contributors to categorize changes, describe modifications, detail testing procedures, and confirm adherence to project standards. ```markdown ## Change Type - [ ] Bug fix - [ ] New feature - [ ] Refactoring - [ ] Documentation update - [ ] Other ## Change Description ## Testing ## Checklist - [ ] All tests pass - [ ] Code follows project standards - [ ] Updated documentation - [ ] Added test cases ``` -------------------------------- ### Clone Repository - Bash Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Clones the MCP Milvus repository from GitHub and navigates into the project directory. Assumes Git is installed. ```bash git clone https://github.com/YOUR_USERNAME/mcp-milvus.git cd mcp-milvus ``` -------------------------------- ### Start MCP Milvus Server Source: https://github.com/tailabs/mcp-milvus/blob/master/README.md Starts the MCP Milvus server. This can be done using the provided Makefile for convenience or by directly executing the built binary. Assumes the server has been built. ```bash # Using Makefile make run # Or directly ./build/mcp-milvus ``` -------------------------------- ### Install Go Dependencies - Bash Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Downloads all the necessary Go module dependencies for the project. Requires Go 1.24+ and a go.mod file. ```bash go mod download ``` -------------------------------- ### Install from Source using Go Source: https://github.com/tailabs/mcp-milvus/blob/master/README.md Installs the MCP Milvus project from source using Go commands. This involves cloning the repository, downloading Go modules, and building the executable. Requires Go 1.24+ and a running Milvus instance. ```bash git clone https://github.com/tailabs/mcp-milvus.git cd mcp-milvus go mod download go build -o mcp-milvus ./cmd/mcp-milvus ``` -------------------------------- ### Run All Tests - Bash Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Executes all tests within the project to ensure code integrity. Requires Go to be installed. ```bash go test ./... ``` -------------------------------- ### Generate Coverage Report - Bash Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Generates a coverage profile and opens it as an HTML report in the browser. Requires Go to be installed. ```bash go test -coverprofile=coverage.out ./... go tool cover -html=coverage.out ``` -------------------------------- ### Build Project Executable - Bash Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Compiles the Go project into an executable file named 'mcp-milvus'. Requires Go 1.24+. ```bash go build -o mcp-milvus ./cmd/mcp-milvus ``` -------------------------------- ### Docker Deployment Source: https://github.com/tailabs/mcp-milvus/blob/master/README.md Builds a Docker image for the MCP Milvus server and runs it as a container. This provides a convenient way to deploy the application. Assumes Docker is installed. ```bash # Build image docker build -t mcp-milvus . # Run container docker run -p 8080:8080 mcp-milvus ``` -------------------------------- ### Run Specific Package Tests - Bash Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Executes tests only for a specified package within the Go project. Requires Go to be installed. ```bash go test ./internal/schema ``` -------------------------------- ### Commit Code Changes - Bash Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Stages all changes and commits them with a specified message. Requires Git to be installed. ```bash git add . git commit -m "feat: add awesome new feature" ``` -------------------------------- ### Create Git Branch - Bash Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Commands to create a new Git branch for either a new feature or a bug fix. Requires Git to be installed. ```bash git checkout -b feature/your-feature-name # or git checkout -b fix/issue-number ``` -------------------------------- ### Add New Milvus Tool - Go Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Defines and registers a new Milvus tool within the MCP framework. Includes schema definition and handler implementation. Requires Go and MCP libraries. ```go package tools import ( "context" "github.com/tailabs/mcp-milvus/internal/registry" "github.com/tailabs/mcp-milvus/internal/session" "github.com/mark3labs/mcp-go/mcp" "github.com/mark3labs/mcp-go/server" ) // NewFeatureTool represents the new feature tool type NewFeatureTool struct{} // Tool registrar func (t *NewFeatureTool) GetTool() mcp.Tool { return mcp.Tool{ Name: "milvus_new_feature", Description: "Description of the new feature", InputSchema: map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "param1": map[string]interface{}{ "type": "string", "description": "Parameter description", }, }, "required": []string{"param1"}, }, } } func (t *NewFeatureTool) GetHandler() server.ToolHandlerFunc { return func(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) { // Implementation here return &mcp.CallToolResult{ Content: []interface{}{ map[string]interface{}{ "type": "text", "text": "Success result", }, }, }, nil } } // Auto-register tool func init() { registry.RegisterTool(&NewFeatureTool{}) } ``` -------------------------------- ### Push Branch to Remote - Bash Source: https://github.com/tailabs/mcp-milvus/blob/master/CONTRIBUTING.md Pushes the current local branch to the remote repository. Requires Git to be installed and configured. ```bash git push origin feature/your-feature-name ``` -------------------------------- ### Get Milvus Collection Info (JSON) Source: https://context7.com/tailabs/mcp-milvus/llms.txt Retrieves detailed information about a specific collection including schema, indexes, segments, load state, and configuration parameters. Requires the name of the collection to retrieve information for. ```json { "collection_name": "articles" } ``` -------------------------------- ### Available Make Commands Source: https://github.com/tailabs/mcp-milvus/blob/master/README.md Lists and describes the available commands provided by the Makefile for managing the MCP Milvus project. These commands facilitate building, testing, linting, running, and deploying the application. ```bash make help # Show all available commands make build # Build binary make test # Run tests make lint # Run linter make fmt # Format code make run # Build and run make dev # Run with live reload make docker # Build Docker image make build-all # Build for all platforms make release # Prepare release make clean # Clean build artifacts ``` -------------------------------- ### Connect to Milvus Server (JSON) Source: https://context7.com/tailabs/mcp-milvus/llms.txt Establishes a connection to a Milvus server instance with authentication and database selection. This must be called before any other operations to create a session with the Milvus server. It requires the Milvus server address, authentication token, and the desired database name. ```json { "address": "http://localhost:19530", "token": "root:Milvus", "db_name": "default" } ``` -------------------------------- ### Connect to Milvus using milvus_connector Source: https://github.com/tailabs/mcp-milvus/blob/master/README.md Establishes a connection to the Milvus instance using the `milvus_connector` tool. This requires specifying the Milvus service address, authentication token, and database name. ```json { "address": "localhost:19530", "token": "username:password", "db_name": "default" } ``` -------------------------------- ### List Milvus Databases (JSON) Source: https://context7.com/tailabs/mcp-milvus/llms.txt Lists all databases available in the connected Milvus instance. Returns the names of all databases that the authenticated user has access to. This operation does not require any parameters. ```json {} ``` -------------------------------- ### Connection Management Source: https://context7.com/tailabs/mcp-milvus/llms.txt Establishes a connection to a Milvus server instance with authentication and database selection. This must be called before any other operations to create a session with the Milvus server. ```APIDOC ## POST /milvus_connector ### Description Establishes a connection to a Milvus server instance with authentication and database selection. This must be called before any other operations to create a session with the Milvus server. ### Method POST ### Endpoint /milvus_connector ### Parameters #### Request Body - **address** (string) - Required - The address of the Milvus server. - **token** (string) - Optional - The authentication token for the Milvus server. - **db_name** (string) - Optional - The name of the database to connect to. ### Request Example ```json { "address": "http://localhost:19530", "token": "root:Milvus", "db_name": "default" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating a successful connection. #### Response Example ```json "Connected to Milvus successfully, database: default" ``` ``` -------------------------------- ### Create Milvus Database (JSON) Source: https://context7.com/tailabs/mcp-milvus/llms.txt Creates a new database in the connected Milvus instance. Databases provide logical separation of collections and data within a single Milvus deployment. This operation requires the name of the database to be created. ```json { "database_name": "my_app_db" } ``` -------------------------------- ### Database Management Source: https://context7.com/tailabs/mcp-milvus/llms.txt Provides endpoints for managing databases within the connected Milvus instance, including creation, listing, and switching databases. ```APIDOC ## POST /milvus_create_database ### Description Creates a new database in the connected Milvus instance. Databases provide logical separation of collections and data within a single Milvus deployment. ### Method POST ### Endpoint /milvus_create_database ### Parameters #### Request Body - **database_name** (string) - Required - The name of the database to create. ### Request Example ```json { "database_name": "my_app_db" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the database was created successfully. #### Response Example ```json "Database 'my_app_db' created successfully" ``` ## GET /milvus_list_databases ### Description Lists all databases available in the connected Milvus instance. Returns the names of all databases that the authenticated user has access to. ### Method GET ### Endpoint /milvus_list_databases ### Parameters None ### Response #### Success Response (200) - **databases** (string) - A string listing the names of all available databases. #### Response Example ```json "Databases: [default, my_app_db, analytics_db]" ``` ## POST /milvus_use_database ### Description Switches the current session to use a specific database. All subsequent collection operations will operate within this database context. ### Method POST ### Endpoint /milvus_use_database ### Parameters #### Request Body - **database_name** (string) - Required - The name of the database to switch to. ### Request Example ```json { "database_name": "my_app_db" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the database switch was successful. #### Response Example ```json "Successfully switched to database: my_app_db" ``` ``` -------------------------------- ### Create Milvus Collection (JSON) Source: https://context7.com/tailabs/mcp-milvus/llms.txt Creates a new collection with a specified schema. Supports various field types including vectors, scalars, and JSON/Array fields. Optionally creates indexes during collection creation. Requires collection name, schema, and optional index parameters. ```json { "collection_name": "articles", "collection_schema": "{\"auto_id\": false, \"enable_dynamic_field\": true, \"fields\": [{\"name\": \"id\", \"data_type\": \"Int64\", \"is_primary\": true}, {\"name\": \"title\", \"data_type\": \"VarChar\", \"max_length\": 512}, {\"name\": \"embedding\", \"data_type\": \"FloatVector\", \"dimension\": 768}]}", "index_params": "[{\"field_name\": \"embedding\", \"index_type\": \"HNSW\", \"metric_type\": \"COSINE\", \"params\": {\"M\": 16, \"efConstruction\": 256}}]" } ``` -------------------------------- ### Create Milvus Index Source: https://context7.com/tailabs/mcp-milvus/llms.txt Creates an index on a specified field within a collection. Supports various index and metric types for vector fields. Requires collection name, field name, index type, metric type, and optional parameters. ```json // MCP Tool Call: milvus_create_index { "collection_name": "articles", "field_name": "embedding", "index_type": "HNSW", "metric_type": "COSINE", "params": "{\"M\": 16, \"efConstruction\": 256}" } // Response "Index created successfully for collection 'articles', field 'embedding'" ``` -------------------------------- ### Collection Management API Source: https://context7.com/tailabs/mcp-milvus/llms.txt APIs for managing Milvus collections, including dropping, loading, and releasing them from memory. ```APIDOC ## POST /milvus_drop_collection ### Description Drops a collection and permanently deletes all its data. This operation cannot be undone. ### Method POST ### Endpoint /milvus_drop_collection ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection to drop. ### Request Example ```json { "collection_name": "old_articles" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the collection was dropped. #### Response Example ```json "Collection 'old_articles' dropped successfully" ``` ## POST /milvus_load_collection ### Description Loads a collection into memory for search and query operations. Collections must be loaded before vector searches can be performed. ### Method POST ### Endpoint /milvus_load_collection ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection to load. - **replica_number** (string) - Optional - The number of replicas to create for the collection. ### Request Example ```json { "collection_name": "articles", "replica_number": "2" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the collection was loaded. #### Response Example ```json "Collection 'articles' loaded successfully with 2 replica(s)" ``` ## POST /milvus_release_collection ### Description Releases a collection from memory to free up resources. The collection data remains persisted and can be loaded again later. ### Method POST ### Endpoint /milvus_release_collection ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection to release. ### Request Example ```json { "collection_name": "articles" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the collection was released. #### Response Example ```json "Collection released successfully." ``` ``` -------------------------------- ### Load Milvus Collection Source: https://context7.com/tailabs/mcp-milvus/llms.txt Loads a collection into memory to enable search and query operations. Collections must be loaded before any vector searches can be performed. Requires collection name and optionally replica number. ```json // MCP Tool Call: milvus_load_collection { "collection_name": "articles", "replica_number": "2" } // Response "Collection 'articles' loaded successfully with 2 replica(s)" ``` -------------------------------- ### Index Management API Source: https://context7.com/tailabs/mcp-milvus/llms.txt APIs for managing indexes on Milvus collections, including creation and deletion. ```APIDOC ## POST /milvus_create_index ### Description Creates an index on a collection field. For vector fields, supports various index types (IVF_FLAT, IVF_SQ8, IVF_PQ, HNSW, ANNOY, AUTOINDEX) and metric types (COSINE, L2, IP). ### Method POST ### Endpoint /milvus_create_index ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection. - **field_name** (string) - Required - The name of the field to index. - **index_type** (string) - Required - The type of index to create (e.g., HNSW, IVF_FLAT). - **metric_type** (string) - Required - The metric type for the index (e.g., COSINE, L2). - **params** (string) - Required - JSON string representing index-specific parameters (e.g., `{"M": 16, "efConstruction": 256}`). ### Request Example ```json { "collection_name": "articles", "field_name": "embedding", "index_type": "HNSW", "metric_type": "COSINE", "params": "{\"M\": 16, \"efConstruction\": 256}" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the index was created. #### Response Example ```json "Index created successfully for collection 'articles', field 'embedding'" ``` ## POST /milvus_drop_index ### Description Drops an existing index from a collection. After dropping, queries on that field will use brute-force search until a new index is created. ### Method POST ### Endpoint /milvus_drop_index ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection. - **index_name** (string) - Required - The name of the index to drop. ### Request Example ```json { "collection_name": "articles", "index_name": "embedding_idx" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the index was dropped. #### Response Example ```json "Index 'embedding_idx' dropped successfully from collection 'articles'" ``` ``` -------------------------------- ### Data Operations API Source: https://context7.com/tailabs/mcp-milvus/llms.txt APIs for inserting, upserting, deleting, querying, and performing vector searches on Milvus collections. ```APIDOC ## POST /milvus_insert_data ### Description Inserts data into a collection. Data is provided as a JSON array of records, with automatic type conversion based on the collection schema. Supports all Milvus field types including vectors. ### Method POST ### Endpoint /milvus_insert_data ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection to insert data into. - **data** (string) - Required - A JSON string representing an array of records to insert. Each record should be a JSON object. ### Request Example ```json { "collection_name": "articles", "data": "[{\"id\": 1, \"title\": \"Introduction to Vector Databases\", \"embedding\": [0.1, 0.2, 0.3, ...]}, {\"id\": 2, \"title\": \"Machine Learning Fundamentals\", \"embedding\": [0.4, 0.5, 0.6, ...]}]" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the number of records inserted. #### Response Example ```json "Inserted Count: 2" ``` ## POST /milvus_upsert ### Description Inserts or updates data in a collection. If a record with the same primary key exists, it will be updated; otherwise, a new record is inserted. Supports optional partition targeting. ### Method POST ### Endpoint /milvus_upsert ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection. - **data** (string) - Required - A JSON string representing an array of records to upsert. - **partition_name** (string) - Optional - The name of the partition to upsert data into. ### Request Example ```json { "collection_name": "articles", "data": "[{\"id\": 1, \"title\": \"Updated: Introduction to Vector Databases\", \"embedding\": [0.15, 0.25, 0.35, ...]}]", "partition_name": "recent_articles" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the number of records upserted. #### Response Example ```json "Upserted 1 records successfully. Upsert count: 1" ``` ## POST /milvus_delete_entities ### Description Deletes entities from a collection based on a filter expression. Uses Milvus expression syntax to select entities for deletion. ### Method POST ### Endpoint /milvus_delete_entities ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection. - **filter_expr** (string) - Required - The expression to filter entities for deletion (e.g., `id in [1, 2, 3]`). ### Request Example ```json { "collection_name": "articles", "filter_expr": "id in [1, 2, 3]" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the delete operation results. #### Response Example ```json "Delete result: {DeleteCount: 3}" ``` ## POST /milvus_query ### Description Queries a collection using filter expressions to retrieve entities matching specific conditions. Returns specified output fields with optional result limiting. ### Method POST ### Endpoint /milvus_query ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection to query. - **filter_expr** (string) - Required - The expression to filter query results (e.g., `id > 0`). - **output_fields** (string) - Optional - A JSON string representing an array of fields to return (e.g., `["id", "title"]`). - **limit** (string) - Optional - The maximum number of results to return. ### Request Example ```json { "collection_name": "articles", "filter_expr": "id > 0", "output_fields": "[\"id\", \"title\"]", "limit": "10" } ``` ### Response #### Success Response (200) - **message** (string) - The query results, typically a JSON array of matching entities. #### Response Example ```json "Query results for 'id > 0' in collection 'articles':\n\nResults: [\n {\"id\": 1, \"title\": \"Introduction to Vector Databases\"},\n {\"id\": 2, \"title\": \"Machine Learning Fundamentals\"}\n]" ``` ## POST /milvus_vector_search ### Description Performs vector similarity search on a collection. Supports various distance metrics, output field selection, and optional scalar filtering to combine vector search with attribute filtering. ### Method POST ### Endpoint /milvus_vector_search ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection to search. - **vector** (string) - Required - The query vector as a JSON string or array. - **vector_field** (string) - Required - The name of the vector field to search against. - **limit** (string) - Required - The maximum number of nearest neighbors to return. - **output_fields** (string) - Optional - A JSON string representing an array of fields to return. - **metric_type** (string) - Optional - The metric type for the search (e.g., COSINE, L2). Defaults to the collection's index metric type if not specified. - **filter_expr** (string) - Optional - An expression to filter results based on scalar fields. ### Request Example ```json { "collection_name": "articles", "vector": "[0.12, 0.23, 0.34, ...]", "vector_field": "embedding", "limit": "5", "output_fields": "[\"id\", \"title\"]", "metric_type": "COSINE", "filter_expr": "id > 0" } ``` ### Response #### Success Response (200) - **message** (string) - The vector search results, typically a list of matching entities with scores. #### Response Example ```json "Vector search results for collection 'articles':\n\nmap[id:1 score:0.9856 title:Introduction to Vector Databases]\n\nmap[id:2 score:0.8234 title:Machine Learning Fundamentals]\n\nmap[id:5 score:0.7891 title:Deep Learning in Practice]" ``` ``` -------------------------------- ### Collection Management Source: https://context7.com/tailabs/mcp-milvus/llms.txt Provides endpoints for managing collections within the current Milvus database, including creation, listing, retrieving information, and renaming. ```APIDOC ## POST /milvus_create_collection ### Description Creates a new collection with a specified schema. Supports various field types including vectors (FloatVector, BinaryVector, Float16Vector, BFloat16Vector), scalars (Int8, Int16, Int32, Int64, Float, Double, Bool, VarChar), and JSON/Array fields. Optionally creates indexes during collection creation. ### Method POST ### Endpoint /milvus_create_collection ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection to create. - **collection_schema** (string) - Required - A JSON string representing the schema of the collection. - **index_params** (array) - Optional - An array of JSON objects defining the indexes to be created for the collection. ### Request Example ```json { "collection_name": "articles", "collection_schema": "{\"auto_id\": false, \"enable_dynamic_field\": true, \"fields\": [{\"name\": \"id\", \"data_type\": \"Int64\", \"is_primary\": true}, {\"name\": \"title\", \"data_type\": \"VarChar\", \"max_length\": 512}, {\"name\": \"embedding\", \"data_type\": \"FloatVector\", \"dimension\": 768}]}", "index_params": "[{\"field_name\": \"embedding\", \"index_type\": \"HNSW\", \"metric_type\": \"COSINE\", \"params\": {\"M\": 16, \"efConstruction\": 256}}]" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the collection was created successfully. #### Response Example ```json "Collection 'articles' created successfully with 3 fields" ``` ## GET /milvus_list_collections ### Description Lists all collections in the current database. Returns the names of collections available for operations. ### Method GET ### Endpoint /milvus_list_collections ### Parameters None ### Response #### Success Response (200) - **collections** (string) - A string listing the names of all collections in the current database. #### Response Example ```json "Collections in database: articles, products, users" ``` ## POST /milvus_get_collection_info ### Description Retrieves detailed information about a specific collection including schema, indexes, segments, load state, and configuration parameters. ### Method POST ### Endpoint /milvus_get_collection_info ### Parameters #### Request Body - **collection_name** (string) - Required - The name of the collection to retrieve information for. ### Request Example ```json { "collection_name": "articles" } ``` ### Response #### Success Response (200) - **collection_info** (object) - An object containing detailed information about the collection. #### Response Example ```json "Collection information: { \"collection_id\": 447474774930551234, \"collection_name\": \"articles\", \"fields\": [ {\"field_id\": 100, \"name\": \"id\", \"is_primary_key\": true, \"data_type\": \"Int64\"}, {\"field_id\": 101, \"name\": \"title\", \"is_primary_key\": false, \"data_type\": \"VarChar\"}, {\"field_id\": 102, \"name\": \"embedding\", \"is_primary_key\": false, \"data_type\": \"FloatVector\"} ], \"shards_num\": 1, \"consistency_level\": \"Bounded\", \"load_state\": \"LoadStateLoaded\", \"loaded\": true, \"indexes\": [{\"name\": \"embedding_idx\", \"index_params\": {\"M\": \"16\", \"efConstruction\": \"256\", \"index_type\": \"HNSW\", \"metric_type\": \"COSINE\"}, \"state\": \"Finished\"}], \"segments\": [] }" ``` ## POST /milvus_rename_collection ### Description Renames an existing collection. The collection must not be loaded in memory during the rename operation. ### Method POST ### Endpoint /milvus_rename_collection ### Parameters #### Request Body - **old_collection_name** (string) - Required - The current name of the collection. - **new_collection_name** (string) - Required - The new name for the collection. ### Request Example ```json { "old_collection_name": "articles", "new_collection_name": "blog_posts" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the collection was renamed successfully. #### Response Example ```json "Collection 'articles' renamed to 'blog_posts' successfully" ``` ``` -------------------------------- ### Vector Search in Milvus Collection Source: https://context7.com/tailabs/mcp-milvus/llms.txt Performs vector similarity search on a collection. Supports various distance metrics, output field selection, and optional scalar filtering to combine vector search with attribute filtering. Requires collection name, vector, vector field, limit, and optionally output fields, metric type, and filter expression. ```json // MCP Tool Call: milvus_vector_search { "collection_name": "articles", "vector": "[0.12, 0.23, 0.34, ...]", "vector_field": "embedding", "limit": "5", "output_fields": "[\"id\", \"title\"]", "metric_type": "COSINE", "filter_expr": "id > 0" } // Response "Vector search results for collection 'articles': map[id:1 score:0.9856 title:Introduction to Vector Databases] map[id:2 score:0.8234 title:Machine Learning Fundamentals] map[id:5 score:0.7891 title:Deep Learning in Practice]" ``` -------------------------------- ### Query Milvus Collection Source: https://context7.com/tailabs/mcp-milvus/llms.txt Queries a collection using filter expressions to retrieve entities matching specific conditions. Allows specifying output fields and limiting the number of results. Requires collection name, filter expression, and optionally output fields and limit. ```json // MCP Tool Call: milvus_query { "collection_name": "articles", "filter_expr": "id > 0", "output_fields": "[\"id\", \"title\"]", "limit": "10" } // Response "Query results for 'id > 0' in collection 'articles': Results: [ {\"id\": 1, \"title\": \"Introduction to Vector Databases\"}, {\"id\": 2, \"title\": \"Machine Learning Fundamentals\"} ]" ``` -------------------------------- ### Rename Milvus Collection (JSON) Source: https://context7.com/tailabs/mcp-milvus/llms.txt Renames an existing collection. The collection must not be loaded in memory during the rename operation. Requires the current name and the new name of the collection. ```json { "old_collection_name": "articles", "new_collection_name": "blog_posts" } ``` -------------------------------- ### Drop Milvus Index Source: https://context7.com/tailabs/mcp-milvus/llms.txt Drops an existing index from a collection. After dropping an index, queries on that field will revert to brute-force search until a new index is created. Requires collection name and index name. ```json // MCP Tool Call: milvus_drop_index { "collection_name": "articles", "index_name": "embedding_idx" } // Response "Index 'embedding_idx' dropped successfully from collection 'articles'" ``` -------------------------------- ### Release Milvus Collection Source: https://context7.com/tailabs/mcp-milvus/llms.txt Releases a collection from memory to free up system resources. The collection's data remains persisted and can be loaded again later. Requires the collection name. ```json // MCP Tool Call: milvus_release_collection { "collection_name": "articles" } // Response "Collection released successfully." ``` -------------------------------- ### Upsert Data in Milvus Collection Source: https://context7.com/tailabs/mcp-milvus/llms.txt Inserts or updates data in a collection based on the primary key. If a record with the same primary key exists, it is updated; otherwise, a new record is inserted. Supports optional partition targeting. Requires collection name, data, and optionally partition name. ```json // MCP Tool Call: milvus_upsert { "collection_name": "articles", "data": "[{\"id\": 1, \"title\": \"Updated: Introduction to Vector Databases\", \"embedding\": [0.15, 0.25, 0.35, ...]}]", "partition_name": "recent_articles" } // Response "Upserted 1 records successfully. Upsert count: 1" ``` -------------------------------- ### Insert Data into Milvus Collection Source: https://context7.com/tailabs/mcp-milvus/llms.txt Inserts data into a specified collection. Data is provided as a JSON array of records and supports automatic type conversion. Accepts collection name and data payload. ```json // MCP Tool Call: milvus_insert_data { "collection_name": "articles", "data": "[{\"id\": 1, \"title\": \"Introduction to Vector Databases\", \"embedding\": [0.1, 0.2, 0.3, ...]}, {\"id\": 2, \"title\": \"Machine Learning Fundamentals\", \"embedding\": [0.4, 0.5, 0.6, ...]}]" } // Response "Inserted Count: 2" ``` -------------------------------- ### Drop Milvus Collection Source: https://context7.com/tailabs/mcp-milvus/llms.txt Drops a specified collection and permanently deletes all its associated data. This action is irreversible. It requires the collection name as input. ```json // MCP Tool Call: milvus_drop_collection { "collection_name": "old_articles" } // Response "Collection 'old_articles' dropped successfully" ``` -------------------------------- ### Delete Entities from Milvus Collection Source: https://context7.com/tailabs/mcp-milvus/llms.txt Deletes entities from a collection based on a provided filter expression using Milvus expression syntax. Requires collection name and filter expression. ```json // MCP Tool Call: milvus_delete_entities { "collection_name": "articles", "filter_expr": "id in [1, 2, 3]" } // Response "Delete result: {DeleteCount: 3}" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.