Skip to main content
Glama
Akxan
by Akxan

PageSpeed Insights / Core Web Vitals

pagespeed
Read-onlyIdempotent

Run PageSpeed Insights audits for a URL to get Lighthouse scores, lab metrics, CrUX field data, failed audits, and top optimization opportunities.

Instructions

Run Google PageSpeed Insights for a URL. Returns Lighthouse category scores (performance, SEO, accessibility, best practices), lab metrics (LCP, CLS, TBT, FCP, Speed Index), real-user CrUX data for the page and for the whole origin (LCP, INP, CLS, FCP, TTFB), so low-traffic pages still get field numbers, the failed audits of every requested category, and the top opportunities with estimated savings. Set PAGESPEED_API_KEY for a higher quota. Each run takes 15-60 s; Google caches results for a short while, so if a call times out simply call again. A 'Lighthouse returned error' after retry usually means the page never becomes idle (endless animations/JS) and cannot be audited by PSI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
localeNoLanguage of the audit titles and descriptions, e.g. 'es', 'en', 'pt-BR'. Default 'en'.
strategyNomobile
categoriesNo
maxFailedAuditsNoFailed audits to list per category.
topOpportunitiesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.0
    • addedInput schema / properties / locale
      Added value: +{
      +  "description": "Language of the audit titles and descriptions, e.g. 'es', 'en', 'pt-BR'. Default 'en'.",
      +  "type": "string"
      +}
    • addedInput schema / properties / maxFailedAudits
      Added value: +{
      +  "default": 15,
      +  "description": "Failed audits to list per category.",
      +  "maximum": 50,
      +  "minimum": 0,
      +  "type": "integer"
      +}
  2. Changed1 schema field changedv0.5.1
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv0.3.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, openWorld), the description discloses important operational behavior: runtime of 15-60 s, Google caching results, retry-after-timeout guidance, API key quota effects, and the meaning of 'Lighthouse returned error' after retry. This substantially helps the agent anticipate failures and decide on retries.

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 front-loaded with the core function and output list, then adds operational caveats in a logical order. Every sentence adds useful information: return contents, quota note, latency, caching/retry behavior, and error interpretation. It is long but each clause earns its place.

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

Completeness5/5

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

For a tool with no output schema, the description covers the return payload thoroughly: Lighthouse scores, lab metrics, CrUX field data, failed audits, and opportunities. It also covers failure modes and retry behavior. An agent has enough context to call the tool, interpret results, and handle common errors.

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

Parameters2/5

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

Schema description coverage is only 33%, so the description carries more responsibility for explaining parameters. It indirectly references categories and top opportunities, but it never clarifies strategy values (mobile/desktop/both), maxFailedAudits limits, or topOpportunities behavior. The locale and maxFailedAudits are already documented in the schema, so the description adds little parameter-level meaning.

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?

The description starts with a specific verb and resource: 'Run Google PageSpeed Insights for a URL.' It then enumerates exactly what is returned (Lighthouse category scores, lab metrics, CrUX data, failed audits, opportunities), making the tool's scope clear and distinguishing it from siblings like crux_snapshot or page_audit.

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?

The description gives clear context on when this tool is appropriate: it provides both lab and field data, and explicitly notes that origin-level CrUX helps low-traffic pages still get field numbers. It does not explicitly name alternative tools or state when not to use it, but the context is strong enough to guide selection.

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