Skip to main content
Glama

docs-mcp-server

list.test.ts834 B
/** Unit test for listAction */ import { Command } from "commander"; import { beforeEach, describe, expect, it, vi } from "vitest"; // Mocks vi.mock("../../store", () => ({ createDocumentManagement: vi.fn(async () => ({ shutdown: vi.fn(), })), })); vi.mock("../../tools", () => ({ ListLibrariesTool: vi .fn() .mockImplementation(() => ({ execute: vi.fn(async () => ({ libraries: [] })) })), })); import { listAction } from "./list"; function _cmd() { return new Command(); } beforeEach(() => { vi.clearAllMocks(); }); describe("listAction", () => { it("executes ListLibrariesTool", async () => { await expect(listAction({ serverUrl: undefined })).resolves.not.toThrow(); const { ListLibrariesTool } = await import("../../tools"); expect(ListLibrariesTool).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