Skip to main content
Glama
strings.ts685 B
import { readYAML } from './yaml.js'; import { join } from 'path'; type StringsMap = Record<string, string>; let stringsCache: StringsMap | null = null; export async function loadStrings(stringsPath: string): Promise<void> { const enPath = join(stringsPath, 'en.yaml'); stringsCache = await readYAML<StringsMap>(enPath); } export function getString(key: string): string { if (!stringsCache) { throw new Error('Strings not loaded. Call loadStrings() first.'); } return stringsCache[key] ?? key; } export function getStringsCache(): StringsMap { if (!stringsCache) { throw new Error('Strings not loaded. Call loadStrings() first.'); } return stringsCache; }

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/Revenant30102000/wotblitz-mcp'

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