Skip to main content
Glama
surendranb

Core Web Vitals MCP Server

by surendranb

get_crux_metrics

Fetch real-user Core Web Vitals metrics for a URL via Google CrUX API. Returns 75th percentile LCP, INP, CLS, FCP, TTFB ratings and overall assessment.

Instructions

Query Google Chrome User Experience Report (CrUX) API for real-user field metrics.

Returns 75th percentile ratings for LCP, INP, CLS, FCP, TTFB, and overall Core Web Vitals assessment.

Args: url: Page URL (e.g. 'https://surendranb.com/blog/article') or root origin ('https://surendranb.com'). form_factor: Device form factor filter ('ALL_FORM_FACTORS', 'PHONE', 'DESKTOP', 'TABLET'). Defaults to ALL_FORM_FACTORS. api_key: Optional Google API Key. If omitted, checks GOOGLE_API_KEY or CRUX_API_KEY environment variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
api_keyNo
form_factorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that api_key falls back to GOOGLE_API_KEY/CRUX_API_KEY environment variables and that results are 75th-percentile field ratings, but it omits failure modes (URLs with insufficient real-user data), rate limits, and confirmation that the call is a non-mutating read.

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

Conciseness4/5

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

Front-loads the purpose and return values, then a clean Args block with one line per parameter. No filler sentences; only minor verbosity in restating the metric list in two places.

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

Completeness4/5

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

An output schema exists, so return-value detail is a bonus rather than a requirement. Required and optional parameters are fully covered, and the only real gap for an agent calling this correctly is undocumented error behavior for low-traffic URLs.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it largely does: it documents all three parameters with a concrete URL example, root-origin vs page-path semantics, the accepted form_factor values ('ALL_FORM_FACTORS', 'PHONE', 'DESKTOP', 'TABLET' – none of which are enums in the schema), the default, and api_key resolution order.

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?

States a specific verb and resource: queries the CrUX API for real-user field metrics, and enumerates the exact metrics returned (LCP, INP, CLS, FCP, TTFB, overall CWV assessment). An agent knows precisely what this produces, though it never names or contrasts itself with the sibling get_crux_history.

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?

Usage is only implied by the phrase 'real-user field metrics' – an agent can infer this is the tool for current CrUX data, but the description never states when to prefer it over get_crux_history or audit_pagespeed, nor any prerequisite (e.g. URL must have sufficient traffic for CrUX data).

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