/**
* Interface for vector database clients
*/
export type PointStruct = {
id: string
vector: number[]
payload: Record<string, any>
}
export interface IVectorStore {
/**
* Initializes the vector store
* @returns Promise resolving to boolean indicating if a new collection was created
*/
initialize(): Promise<boolean>
/**
* Upserts points into the vector store
* @param points Array of points to upsert
*/
upsertPoints(points: PointStruct[]): Promise<void>
/**
* Searches for similar vectors
* @param queryVector Vector to search for
* @param filter Search filter options
* @returns Promise resolving to search results
*/
search(queryVector: number[], filter?: SearchFilter): Promise<VectorStoreSearchResult[]>
/**
* Deletes points by file path
* @param filePath Path of the file to delete points for
*/
deletePointsByFilePath(filePath: string): Promise<void>
/**
* Deletes points by multiple file paths
* @param filePaths Array of file paths to delete points for
*/
deletePointsByMultipleFilePaths(filePaths: string[]): Promise<void>
/**
* Clears all points from the collection
*/
clearCollection(): Promise<void>
/**
* Deletes the entire collection.
*/
deleteCollection(): Promise<void>
/**
* Checks if the collection exists
* @returns Promise resolving to boolean indicating if the collection exists
*/
collectionExists(): Promise<boolean>
/**
* Gets all file paths from the vector store
* @returns Promise resolving to an array of file paths
*/
getAllFilePaths(): Promise<string[]>
}
export interface SearchFilter {
pathFilters?: string[]
minScore?: number
limit?: number
}
export interface VectorStoreSearchResult {
id: string | number
score: number
payload?: Payload | null
}
export interface Payload {
filePath: string
codeChunk: string
startLine: number
endLine: number
[key: string]: any
}
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/anrgct/autodev-codebase'
If you have feedback or need assistance with the MCP directory API, please join our Discord server