Skip to main content
Glama

OpenAI SDK Knowledge MCP Server

by seratch
test-helpers.ts596 B
export const createMockDocument = ( id: string, content: string, metadata: any = {}, ) => ({ id, content, metadata: { title: `Test Document ${id}`, createdAt: "2023-01-01T00:00:00Z", updatedAt: "2023-01-01T00:00:00Z", ...metadata, }, source: "test", }); export const expectToThrow = async ( fn: () => Promise<any>, expectedError?: string, ) => { try { await fn(); throw new Error("Expected function to throw"); } catch (error) { if (expectedError && error instanceof Error) { expect(error.message).toContain(expectedError); } } };

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/seratch/openai-sdk-knowledge-org'

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