Skip to main content
Glama

docs-mcp-server

search.test.ts915 B
/** Unit test for searchAction */ import { Command } from "commander"; import { beforeEach, describe, expect, it, vi } from "vitest"; vi.mock("../../store", () => ({ createDocumentManagement: vi.fn(async () => ({ shutdown: vi.fn() })), })); vi.mock("../../tools", () => ({ SearchTool: vi .fn() .mockImplementation(() => ({ execute: vi.fn(async () => ({ results: [] })) })), })); import { searchAction } from "./search"; function _cmd() { return new Command(); } beforeEach(() => vi.clearAllMocks()); describe("searchAction", () => { it("invokes SearchTool with parameters", async () => { await searchAction("react", "hooks", { version: "18.x", limit: "3", exactMatch: false, serverUrl: undefined, embeddingModel: "mock-embedding-model", }); const { SearchTool } = await import("../../tools"); expect(SearchTool).toHaveBeenCalledTimes(1); }); });

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/arabold/docs-mcp-server'

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