Skip to main content
Glama
nks-hub

rybbit-mcp

by nks-hub

Web Vitals

rybbit_get_performance
Read-onlyIdempotent

Retrieve Core Web Vitals performance metrics (LCP, CLS, INP, FCP, TTFB) with percentile breakdowns. Analyze data by page path, browser, or operating system to monitor website speed and user experience.

Instructions

Get Core Web Vitals performance metrics (LCP, CLS, INP, FCP, TTFB) with p50, p75, p90, p99 percentiles. Optionally break down by page path, browser, or OS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteIdYesSite ID (numeric ID or domain identifier)
startDateNoStart date in ISO format (YYYY-MM-DD)
endDateNoEnd date in ISO format (YYYY-MM-DD)
timeZoneNoIANA timezone (e.g., Europe/Prague). Default: UTC
filtersNoArray of filters. Example: [{parameter:'browser',type:'equals',value:['Chrome']},{parameter:'country',type:'equals',value:['US','DE']}]
pastMinutesStartNoAlternative to dates: minutes ago start (e.g., 60 = last hour)
pastMinutesEndNoAlternative to dates: minutes ago end (default 0 = now)
dimensionNoBreak down performance by dimension. Default: overview (aggregated)

Implementation Reference

  • The "rybbit_get_performance" tool is registered and its logic handler is defined within the `registerPerformanceTools` function in `src/tools/performance.ts`. It fetches either aggregated performance overview or breakdown by dimension (pathname, browser, operating_system) using the RybbitClient.
    server.registerTool(
      "rybbit_get_performance",
      {
        title: "Web Vitals",
        description:
          "Get Core Web Vitals performance metrics (LCP, CLS, INP, FCP, TTFB) with p50, p75, p90, p99 percentiles. Optionally break down by page path, browser, or OS.",
        annotations: {
          readOnlyHint: true,
          idempotentHint: true,
          openWorldHint: true,
          destructiveHint: false,
        },
        inputSchema: {
          ...analyticsInputSchema,
          dimension: dimensionSchema,
        },
      },
      async (args) => {
        try {
          const { siteId, dimension, ...rest } = args as {
            siteId: string;
            dimension?: "overview" | "pathname" | "browser" | "operating_system";
            startDate?: string;
            endDate?: string;
            timeZone?: string;
            filters?: Array<{
              parameter: string;
              type: string;
              value: (string | number)[];
            }>;
            pastMinutesStart?: number;
            pastMinutesEnd?: number;
          };
    
          const params = client.buildAnalyticsParams(rest);
    
          if (
            dimension === "pathname" ||
            dimension === "browser" ||
            dimension === "operating_system"
          ) {
            params.dimension = dimension;
            const data = await client.get<PerformanceByDimension[]>(
              `/sites/${siteId}/performance/by-dimension`,
              params
            );
            return {
              content: [{ type: "text" as const, text: truncateResponse(data) }],
            };
          }
    
          const data = await client.get<PerformanceOverview>(
            `/sites/${siteId}/performance/overview`,
            params
          );
          return {
            content: [{ type: "text" as const, text: truncateResponse(data) }],
          };
        } catch (err) {
          const message = err instanceof Error ? err.message : String(err);
          return {
            content: [{ type: "text" as const, text: `Error: ${message}` }],
            isError: true,
          };
        }
      }
    );
Behavior4/5

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

Adds valuable context beyond annotations by specifying exact Web Vitals metrics and percentile distributions. Annotations cover safety (readOnly, idempotent) but description explains what data structure returns. Does not mention rate limits or data retention policies, but this is acceptable given annotation coverage.

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?

Two sentences with zero waste. Front-loaded with specific metrics and percentiles (most critical info), followed by optional capabilities. Every word earns its place.

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

Completeness3/5

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

Adequate for basic invocation but incomplete given the tool's complexity (8 parameters including nested filter objects). Without output schema, description appropriately lists return metrics, but should mention the filtering capabilities and date alternatives to be complete. Sufficient for simple use cases, gaps for advanced usage.

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?

Schema coverage is 100%, establishing baseline 3. Description adds human-readable mapping for the 'dimension' parameter ('break down by page path, browser, or OS' corresponds to pathname/browser/operating_system enum values). However, it completely omits the complex 'filters' array functionality despite its centrality to the tool's power.

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

Purpose5/5

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

Excellent specificity. States exact metrics retrieved (LCP, CLS, INP, FCP, TTFB) and statistical aggregations (p50, p75, p90, p99 percentiles), distinguishing it from the sibling timeseries tool. Verb 'Get' is precise and resource is clearly identified as Core Web Vitals.

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

Usage Guidelines3/5

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

Provides implied usage through breakdown options (page path, browser, OS) but lacks explicit when-to-use guidance versus rybbit_get_performance_timeseries. Fails to mention the rich filtering system (filters array) or alternative date input methods (pastMinutes), which limits agent awareness of full capabilities.

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/nks-hub/rybbit-mcp'

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