Skip to main content
Glama

mcp-lancedb

by adiom-data
catalog_search.ts1 kB
import { catalogTable, catalogVectorStore, chunksVectorStore } from "../../lancedb/client.js"; import { BaseTool, ToolParams } from "../base/tool.js"; export interface CatalogSearchParams extends ToolParams { text: string; } export class CatalogSearchTool extends BaseTool<CatalogSearchParams> { name = "catalog_search"; description = "Search for relevant documents in the catalog"; inputSchema = { type: "object" as const, properties: { text: { type: "string", description: "Search string", default: {}, }, }, required: ["text"], }; async execute(params: CatalogSearchParams) { try { const retriever = catalogVectorStore.asRetriever({}); const results = await retriever.invoke(params.text); return { content: [ { type: "text" as const, text: JSON.stringify(results, null, 2) }, ], isError: false, }; } catch (error) { return this.handleError(error); } } }

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/adiom-data/lance-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server