Skip to main content
Glama
metrics-manager.ts649 B
import { z } from 'zod'; import { logger } from '../config/logging.js'; import { getMetrics } from '../storage/metrics.js'; /** * Schema for the stats tool (no inputs) */ export const statsSchema = z.object({}); /** * Retrieve all metrics counters */ export async function stats(): Promise<Array<{ name: string; count: number }>> { try { const metrics = await getMetrics(); return metrics; } catch (error) { logger.error(`Error retrieving metrics: ${error instanceof Error ? error.message : String(error)}`); throw new Error(`Failed to retrieve metrics: ${error instanceof Error ? error.message : 'Unknown error'}`); } }

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/Saml1211/PRD-MCP-Server'

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