Skip to main content
Glama
test-search-direct.js1.2 kB
import { readFile } from 'fs/promises'; import { join } from 'path'; // Simple test to check if we can read the vector database files async function testVectorData() { try { const vectorPath = '/Users/jaksm/expo-docs-mcp/dist/latest/vector'; // Check if args.json exists (contains search configuration) const argsPath = join(vectorPath, 'args.json'); const args = JSON.parse(await readFile(argsPath, 'utf8')); console.log('Vector database configuration:', args); // Check if docstore.json exists (contains document metadata) const docstorePath = join(vectorPath, 'docstore.json'); const docstore = JSON.parse(await readFile(docstorePath, 'utf8')); const docIds = Object.keys(docstore); console.log(`Found ${docIds.length} documents in vector store`); // Sample a few documents to check quality console.log('\nSample documents:'); docIds.slice(0, 3).forEach(id => { const doc = docstore[id]; console.log(`- ${doc.metadata?.source || 'Unknown source'}: "${doc.pageContent?.substring(0, 100)}..."`); }); } catch (error) { console.error('Error reading vector data:', error.message); } } testVectorData();

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/jaksm/expo-docs-mcp'

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