Skip to main content
Glama

docs-mcp-server

list.ts1.51 kB
/** * List command - Lists all available libraries and their versions. */ import type { Command } from "commander"; import { createDocumentManagement } from "../../store"; import { analytics, TelemetryEvent } from "../../telemetry"; import { ListLibrariesTool } from "../../tools"; import { formatOutput, getGlobalOptions } from "../utils"; export async function listAction(options: { serverUrl?: string }, command?: Command) { await analytics.track(TelemetryEvent.CLI_COMMAND, { command: "list", useServerUrl: !!options.serverUrl, }); const { serverUrl } = options; const globalOptions = getGlobalOptions(command); // List command doesn't need embeddings - explicitly disable for local execution const docService = await createDocumentManagement({ serverUrl, embeddingConfig: serverUrl ? undefined : null, storePath: globalOptions.storePath, }); try { const listLibrariesTool = new ListLibrariesTool(docService); // Call the tool directly - tracking is now handled inside the tool const result = await listLibrariesTool.execute(); console.log(formatOutput(result.libraries)); } finally { await docService.shutdown(); } } export function createListCommand(program: Command): Command { return program .command("list") .description("List all available libraries and their versions") .option( "--server-url <url>", "URL of external pipeline worker RPC (e.g., http://localhost:6280/api)", ) .action(listAction); }

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