Skip to main content
Glama

pagespeed_audit

Run a PageSpeed Insights audit on any URL to get Lighthouse performance scores, Core Web Vitals, and top optimization opportunities for mobile or desktop.

Instructions

Run a PageSpeed Insights audit via Google's PSI API v5.

Requires GOOGLE_API_KEY environment variable (plain API key, not service account). The PageSpeed Insights API must be enabled in the GCP project.

strategy: "mobile" (default) or "desktop". Returns Lighthouse performance score, Core Web Vitals, and top opportunities. Verdicts: good (score>=90) | needs_improvement (50-89) | poor (<50) | missing_key | fetch_error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
strategyNomobile

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

B3.2/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 burden, and it does disclose real behavioral context: a plain GOOGLE_API_KEY is required (not a service account) and the PSI API must be enabled. It also enumerates failure verdicts (missing_key, fetch_error). However, it omits important runtime traits such as rate limits, the slow/long-running nature of PSI audits, and quota behavior.

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-loaded with the core action and prerequisites, then parameter values and outputs in a tight, scannable layout. Slight redundancy in restating return values that the output schema already provides.

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?

For a 2-parameter tool with an output schema and no annotations, the prerequisite/auth details, strategy values, and verdict domain make it largely callable without ambiguity. Return-value restatement is unnecessary given the output schema, and runtime expectations (latency, limits) are the remaining gap.

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 description coverage is 0%, so the description must compensate. It clarifies the only non-obvious parameter by listing strategy values ("mobile" default or "desktop"), which the schema lacks as an enum. The url parameter's format/constraints remain undocumented, so it only partially compensates for the coverage gap.

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 (Run) and resource (PageSpeed Insights audit via Google's PSI API v5), and names the concrete outputs (Lighthouse performance score, Core Web Vitals, top opportunities). It is clearly distinguishable from siblings like crux_page_vitals or page_technical_audit by naming the PSI API and Lighthouse, though it does not explicitly contrast itself against those neighbors.

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 covers prerequisites (API key, enabling the API) but gives no when-to-use guidance relative to the many sibling auditing tools (page_technical_audit, page_analysis, crux_page_vitals). An agent must infer usage context from the tool name alone.

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