We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/benkaiser/mob-mcp-crm'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
utils.ts•469 B
import { randomBytes } from 'node:crypto';
/**
* Generate an 8-character base-36 ID (digits + lowercase letters).
*
* 36^8 ≈ 2.8 trillion combinations — effectively zero collision risk
* for the <10K entities a single user will ever have, while consuming
* ~75 % fewer tokens than the previous 32-char hex IDs.
*/
export function generateId(): string {
const num = randomBytes(6).readUIntBE(0, 6);
return num.toString(36).padStart(8, '0').slice(0, 8);
}