Skip to main content
Glama
trace-id.ts360 B
export function traceIdMiddleware(req: any, res: any, next: any) { // Check both top-level traceId variable and nested options.traceId const traceId = req.body?.variables?.traceId || req.body?.variables?.options?.traceId || generateTraceId(); req.traceId = traceId; next(); } export function generateTraceId(): string { return crypto.randomUUID(); }

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/superglue-ai/superglue'

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