Skip to main content
Glama
lekt9

OpenReplay MCP Server

by lekt9

get_performance_metrics

Extract user session performance metrics such as page load times, largest contentful paint, and time to interactive. Analyze data by page, browser, device, or country with customizable percentiles for detailed insights.

Instructions

Get performance metrics like page load times, largest contentful paint, time to interactive, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endDateNoEnd date in ISO format
groupByNo
metricsYes
percentilesNoPercentiles to calculate (e.g., [50, 75, 90, 95, 99])
startDateNoStart date in ISO format

Implementation Reference

  • The handler function that executes the get_performance_metrics tool logic. Currently a stub indicating JWT auth is required.
    private async getPerformanceMetrics(args: any) { // Performance metrics require JWT authentication return { content: [ { type: "text", text: "Performance metrics are not available via API key authentication. JWT authentication is required for this feature.", }, ], }; }
  • src/index.ts:225-252 (registration)
    Registration of the tool in the ListTools response, including name, description, and input schema definition.
    { name: "get_performance_metrics", description: "Get performance metrics like page load times, largest contentful paint, time to interactive, etc.", inputSchema: { type: "object", properties: { startDate: { type: "string", description: "Start date in ISO format" }, endDate: { type: "string", description: "End date in ISO format" }, metrics: { type: "array", items: { type: "string", enum: ["load_time", "dom_complete", "first_paint", "first_contentful_paint", "largest_contentful_paint", "time_to_interactive", "cpu_load", "memory_usage"] } }, groupBy: { type: "array", items: { type: "string", enum: ["page", "browser", "device", "country"] } }, percentiles: { type: "array", items: { type: "number" }, description: "Percentiles to calculate (e.g., [50, 75, 90, 95, 99])" } }, required: ["metrics"] } },
  • src/index.ts:292-293 (registration)
    Dispatch case in the CallToolRequest handler switch statement that invokes the tool handler.
    case "get_performance_metrics": return await this.getPerformanceMetrics(args);
  • Input schema definition for the get_performance_metrics tool.
    inputSchema: { type: "object", properties: { startDate: { type: "string", description: "Start date in ISO format" }, endDate: { type: "string", description: "End date in ISO format" }, metrics: { type: "array", items: { type: "string", enum: ["load_time", "dom_complete", "first_paint", "first_contentful_paint", "largest_contentful_paint", "time_to_interactive", "cpu_load", "memory_usage"] } }, groupBy: { type: "array", items: { type: "string", enum: ["page", "browser", "device", "country"] } }, percentiles: { type: "array", items: { type: "number" }, description: "Percentiles to calculate (e.g., [50, 75, 90, 95, 99])" } }, required: ["metrics"] }

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/lekt9/openreplay-mcp'

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