codebolt.vector
Vector database operations for adding, querying, and retrieving vectors.
Available Tools
add_item- Add an item to the vector databasequery- Query the vector databaseget_vector- Retrieve a vector by item
Tool Parameters
add_item
Adds an item to the vector database. The item will be converted to a vector representation for similarity search.
| Parameter | Type | Required | Description |
|---|---|---|---|
| item | string | Yes | The text content or data to add to the vector database |
query
Queries the vector database to find items similar to the provided query.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | The search query text to find similar items |
| topK | number | No | Maximum number of similar results to return (default: 1) |
get_vector
Retrieves a vector representation for a specific item from the database.
| Parameter | Type | Required | Description |
|---|---|---|---|
| item | string | Yes | The identifier or key of the item to retrieve the vector for |
Sample Usage
// Add an item to the vector database
const addResult = await codebolt.tools.executeTool(
"codebolt.vector",
"add_item",
{ item: "This is a test document for vector database" }
);
// Query the vector database
const queryResult = await codebolt.tools.executeTool(
"codebolt.vector",
"query",
{ query: "test document vector", topK: 1 }
);
// Retrieve a vector by item
const getVectorResult = await codebolt.tools.executeTool(
"codebolt.vector",
"get_vector",
{ item: "test-vector-001" }
);
info
This functionality provides vector database operations through the MCP interface.