Skip to main content
Glama

Document QA MCP Server

by parikshith49
retrieveChunks.ts498 B
import { qdrant } from '../services/qdrantService'; import { embedText } from '../tools/answerTool'; const COLLECTION_NAME = 'documents'; export async function getRelevantChunks(query: string): Promise<string[]> { const queryEmbedding = await embedText(query); const response = await qdrant.search(COLLECTION_NAME, { vector: queryEmbedding, limit: 3, with_payload: true, }); const chunks: string[] = response.map((item: any) => item.payload?.text || ''); return chunks; }

Latest Blog Posts

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/parikshith49/document-qa-mcp12'

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