Skip to main content
Glama
lekt9

OpenReplay MCP Server

by lekt9

get_performance_metrics

Retrieve web performance metrics including page load times, largest contentful paint, and time to interactive to analyze user experience and identify optimization opportunities.

Instructions

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

Input Schema

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

Implementation Reference

  • The handler function that implements the logic for the 'get_performance_metrics' tool. Currently, it returns a message indicating that JWT authentication is required for full access.
    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 'get_performance_metrics' 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)
    The switch case in the CallToolRequest handler that routes calls to the getPerformanceMetrics method.
    case "get_performance_metrics":
      return await this.getPerformanceMetrics(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only mentions what metrics can be retrieved but doesn't disclose any behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, data freshness, or what the output format looks like. For a tool with 5 parameters and no annotations, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for the tool's complexity and front-loads the core purpose immediately. Every word earns its place by specifying the type of metrics retrieved.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain the behavioral context (read-only vs. mutation, rate limits, etc.), doesn't clarify when to use it versus sibling tools, and provides minimal parameter guidance beyond what's in the schema. For a data retrieval tool with multiple parameters and siblings, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'performance metrics like page load times, largest contentful paint, time to interactive, etc.' which partially maps to the 'metrics' parameter. However, with 60% schema description coverage (3 out of 5 parameters have descriptions), the description doesn't add meaningful semantics beyond what the schema already provides for startDate, endDate, groupBy, and percentiles. The baseline is 3 since schema coverage is moderate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'performance metrics', with specific examples like page load times and largest contentful paint. It distinguishes from siblings by focusing on performance metrics rather than sessions, errors, or user journeys. However, it doesn't explicitly differentiate from all siblings (e.g., execute_custom_query could potentially retrieve similar data).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools like get_session_details, get_errors_issues, and execute_custom_query, there's no indication of the specific context or scenarios where this tool is appropriate versus those alternatives. The description only states what it does, not when to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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