Skip to main content
Glama
docs-roots.ts504 B
import path from "node:path"; import type { DocsRoot } from "./types.js"; export function parseDocsRoots(raw: string[] | undefined): DocsRoot[] { const inputs = raw && raw.length ? raw : ["docs/en:en"]; const resolved: DocsRoot[] = []; for (const entry of inputs) { const [pathPart, langPart] = entry.split(":"); const fullPath = path.resolve(pathPart); const lang = (langPart || path.basename(fullPath) || "en").toLowerCase(); resolved.push({ path: fullPath, lang }); } return resolved; }

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

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