Skip to main content
Glama

pagespeed

Run Lighthouse audits to get a page performance score (0–100), Core Web Vitals, and top improvement opportunities.

Instructions

Run Lighthouse for performance score (0–100), lab Core Web Vitals (LCP, CLS, TBT, FCP, Speed Index, TTI), and top improvement opportunities. Default engine is Google PageSpeed Insights (hosted; adds real-user CrUX field data when available; keyless but rate-limited — set PAGESPEED_API_KEY to raise the quota), and it auto-falls-back to a LOCAL Lighthouse run if PSI is over quota. Set local=true to force the local engine (no key, no quota; needs Chrome on the host; no CrUX field data; runs headless Chrome silently).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesPage URL
localNoForce the local Lighthouse engine instead of Google PSI (no API key/quota; requires Chrome installed; lab metrics only). Default false.
detailNoReturn the full GTmetrix-style detail: all four category scores (Performance, Accessibility, Best Practices, SEO), diagnostics (server response, DOM size, page weight, request count), resource breakdown, prioritized suggestions with descriptions, and passed best-practice checks. Default false.
strategyNo"mobile" (default) or "desktop"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.9
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / detail
      Added value: +{
      +  "description": "Return the full GTmetrix-style detail: all four category scores (Performance, Accessibility, Best Practices, SEO), diagnostics (server response, DOM size, page weight, request count), resource breakdown, prioritized suggestions with descriptions, and passed best-practice checks. Default false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / local
      Added value: +{
      +  "description": "Force the local Lighthouse engine instead of Google PSI (no API key/quota; requires Chrome installed; lab metrics only). Default false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / strategy / enum
      Added value: +[
      +  "mobile",
      +  "desktop"
      +]
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses rate limiting, API-key requirements, automatic fallback behavior on quota exhaustion, that the local path requires Chrome on the host, that local runs headless Chrome silently, and that field (CrUX) data is only available via PSI. These are exactly the operational facts an agent needs before invoking.

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?

Outputs are front-loaded in the first sentence, followed by engine behavior and the local override, so the reader gets the what before the how. It is dense but every clause carries distinct information; the long parenthetical lists add bulk without much waste.

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?

With no output schema, the description does useful work by naming the metrics returned and noting that detail=true expands to full category scores, diagnostics, and prioritized suggestions. Minor gap: it never states whether results are a single snapshot or if auditing multiple URLs requires the sibling audit_site.

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 100%, so all four parameters are already documented in the schema, including the local flag's requirement for Chrome and its lab-only nature. The description largely restates that schema text, adding only the engine-selection framing rather than new parameter semantics. Baseline 3 is appropriate.

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?

States a specific verb and resource ('Run Lighthouse') plus the exact outputs it produces: performance score 0-100, lab Core Web Vitals (LCP, CLS, TBT, FCP, Speed Index, TTI), and improvement opportunities. This distinguishes it from siblings like audit_page and audit_site, which are not described as Lighthouse/PSI runs.

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

Usage Guidelines4/5

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

Gives clear context for the engine decision: default PSI adds CrUX field data but is rate-limited, set PAGESPEED_API_KEY to raise quota, auto-fallback to local on quota exhaustion, and set local=true to force local (no key/quota, needs Chrome, no field data). It does not, however, explain when to choose this tool over sibling audit_page/audit_site, so it stops short of full when/when-not/alternatives guidance.

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