# Vald MCP

> Vald connects your AI agent to a high-speed, distributed vector knowledge base. It lets you perform approximate nearest neighbor (ANN) searches across millions of embedded data points directly from your conversational workflow. Use it to query vectors with `search_vectors`, manage indices with `insert_vector` and `update_vector`, or check the cluster health using `get_engine_info`. It's built for ML engineers who need reliable, deep context retrieval.

## Overview
- **Category:** databases
- **Price:** Free
- **Tags:** vector-search, ann, distributed-systems, machine-learning, high-performance, embeddings

## Description

Vald connects your agent to a high-speed, distributed vector knowledge base. It lets you perform approximate nearest neighbor **(ANN)** searches across millions of embedded data points right from your conversational workflow. It's built for ML engineers who need deep context retrieval that doesn't stall the whole system.

The Vald MCP Server exposes tools to manage massive collections of embeddings, treating them like a lightning-fast knowledge graph instead of traditional database tables. You interact with it using ` and **Bold** functions exposed through your AI client.

When you need deep context for an answer, you use `search_vectors`. This function takes a query vector from your agent and instantly pulls back the most semantically similar vectors stored in the index. It doesn't just find keywords; it finds concepts that mean the same thing. If you want to inspect what raw data belongs to a specific record after a search, you can call `get_vector_details`, passing in a unique ID so your agent pulls the full dimensional array for inspection.

Managing the data itself is straightforward. To add brand new knowledge, your agent uses `insert_vector`. This requires two things: a guaranteed unique ID and the complete embedding array. The cluster accepts this data immediately for future retrieval. If you change an existing record's meaning or context, you don't have to recreate it; you just call `update_vector`, providing both the original ID and the replacement embedding array. This changes the vector without disrupting any active connections or queries.

Cleanup is equally easy. When data gets corrupted or becomes irrelevant, your agent executes `delete_vector`. You pass a specific ID, and the server permanently purges that vector from the Vald index—it’s gone for good. For system reliability, you check the entire infrastructure status by calling `get_engine_info`. This function retrieves operational data and confirms that the whole Vald cluster is healthy and ready to accept requests. You've got all the tools here to keep your knowledge base accurate, fast, and robust.

## Tools

### get_engine_info
Retrieves operational information and checks the current health status of the Vald engine cluster.

### get_vector_details
Pulls the raw vector data for a specific record ID so you can inspect its dimensions or values.

### insert_vector
Inserts a brand new vector into the Vald index, requiring both a unique ID and the full embedding array.

### delete_vector
Permanently removes a specified vector from the Vald index. This action cannot be undone.

### update_vector
Replaces an existing vector record with new data by providing the original ID and the replacement array.

### search_vectors
Performs a nearest neighbor search using a query vector, returning the most similar vectors in the index.

## Prompt Examples

**Prompt:** 
```
Is the Vald cluster operational right now?
```

**Response:** 
```
I've checked the Vald Gateway. The engine is healthy and accepting requests! The current clustered infrastructure responds well to Ping mechanisms.
```

**Prompt:** 
```
Can you check the vector details stored for UUID 'user-profile-89'?
```

**Response:** 
```
I retrieved the vector data for `user-profile-89`. The embedding array spans 768 dimensions. Do you want me to render its raw float values here or proceed to query for its nearest neighbors?
```

**Prompt:** 
```
Update the existing item 'context-fragment-12' with this new 1536-dimensional array: [0.38, -0.19, 0...].
```

**Response:** 
```
Done. The vector for ID `context-fragment-12` has been successfully updated in your Vald cluster. The engine replaced its old representation with your newly uploaded 1536-dimensional array without breaking any active query connections.
```

## Capabilities

### Semantic Search
You query the Vald index using your agent and get back the most semantically similar vectors from millions of records.

### Add Vectors to Index
Your agent calls `insert_vector` to add a new vector, complete with a unique ID, directly into the Vald cluster for future retrieval.

### Modify Existing Records
You use `update_vector` to change an existing record's embedding array without disrupting active connections or queries.

### Remove Corrupted Data
Your agent executes `delete_vector` when it needs to permanently purge a vector from the index, making sure it can't be found again.

### Check Cluster Status
You call `get_engine_info` to retrieve operational data and confirm that the entire Vald cluster is healthy and accepting requests.

## Use Cases

### Validating RAG context in real-time
A Data Scientist needs to confirm if a new knowledge document embeds correctly. Instead of running slow scripts, they ask their agent: 'Search for vectors related to Q3 sales using this query vector.' The agent runs `search_vectors` and instantly validates the search recall results.

### Migrating old data records
A Backend Developer finds a legacy record with an outdated embedding. They use `get_vector_details` to pull the original ID, then run `update_vector` with the newly generated array. This updates the context source without needing terminal access.

### Debugging cluster instability
An Ops Engineer notices latency spikes. They ask their agent: 'What's the status of the Vald cluster?' The agent runs `get_engine_info`, immediately diagnosing if it’s a node issue or just a temporary glitch.

### Curating knowledge bases
An ML Engineer wants to test how an embedding change affects search results. They use `insert_vector` to add the new vector, then immediately follow up with a `search_vectors` call to compare the output against the old data.

## Benefits

- You get instant, deep context retrieval. Instead of relying on simple keywords, running `search_vectors` uses semantic matching to pull relevant data points from millions of vectors.
- Data cleanup is fast and controlled. Need to purge corrupted or outdated embeddings? Use `delete_vector` to remove specific records permanently without touching the rest of your index.
- You maintain a clean system state by running `get_engine_info`. This lets you check cluster health and node details via natural language, which saves you from manually checking dashboards when things go sideways.
- Updating context is easy. Use `update_vector` to swap out an old embedding representation for a new one, keeping your RAG pipeline current without downtime or complex database writes.
- You gain full visibility into raw data structures via `get_vector_details`. This lets you verify the exact dimensions and float values of any vector by simply querying its ID.

## How It Works

The bottom line is: Your AI agent becomes the direct API layer to a massive, high-speed knowledge graph that was previously hard to access.

1. Subscribe to the Vald server on Vinkius Marketplace. Then, plug in your specific Vald Gateway Host address.
2. Your AI client sends a command—say, running `search_vectors` with a query array—to the MCP endpoint.
3. Vald processes the request against its distributed engine and returns the nearest neighbor vector data to your agent.

## Frequently Asked Questions

**How do I check if my Vald cluster is running correctly using `get_engine_info`?**
Just tell your agent, 'Check the status of the Vald cluster.' The tool runs `get_engine_info` and returns operational details, confirming things like node health and overall availability.

**What is the difference between `search_vectors` and standard database search?**
`search_vectors` doesn't look for keywords; it finds conceptual matches. It uses vector math to determine how semantically close one piece of data is to a query, giving you true contextual relevance.

**Can I modify vectors that are already in the index using `update_vector`?**
Yes. You provide the existing ID and the new vector array, and Vald replaces the old representation entirely. It's designed for non-disruptive updates.

**What if I need to remove a single piece of data? Should I use `delete_vector`?**
Yes. If you need to permanently purge a record, always run `delete_vector`. It's irreversible and ensures the ID is removed from all future searches.

**What information must I provide when running `insert_vector`?**
You need two things: a unique ID and the vector data formatted as a JSON array. The ID acts as the primary key, ensuring every record is instantly retrievable by its name.

**If I run `search_vectors` repeatedly on millions of records, will it slow down?**
No. Because Vald uses an Approximate Nearest Neighbor (ANN) engine, performance remains fast even with massive datasets. It's designed for high-speed retrieval across huge vector spaces.

**What happens if I try to insert a vector using `insert_vector` that shares an ID with another record?**
The system expects unique IDs. If you attempt to use an existing ID, the operation will fail or overwrite data, depending on your client's logic. Use `update_vector` if you just need to change the embedding.

**What format is the raw vector data I get from `get_vector_details`?**
The output is always a pure, high-dimensional array of floating-point numbers. This isn't human-readable text; it’s the mathematical embedding that defines the record’s meaning.

**Can my AI agent do a semantic search across my vector database?**
Yes! Provided you supply the embedded query vector, your agent can issue a `vector search` command to the Vald Engine. It will rapidly scan millions of indexes natively using its ANN algorithms and return the top-K closest neighbors associated with your data.

**How do I ensure my Vald cluster is healthy right from my CLI?**
Skip complex diagnostics loops. Instruct your agent to `get Vald internal engine info`. It will interface directly via gRPC/REST and pull down cluster metrics including operational status, agent versions, and basic diagnostic health. This is vital for MLOps managing production RAG pipelines needing constant reassurance.

**Can I permanently purge a corrupted vector embedding?**
When a document becomes stale in your knowledge base, you must remove its embedding. Ask the AI agent: `permanently delete vector ID 'doc-xyz'`. Using the `removeVector` capability, it targets your cluster and ensures the outdated semantic representation is fully expunged without risking other node data.