Skip to main content
Glama
PageSpeed Insights MCP Server

PageSpeed Insights MCP Server

Analyze Multiple Pages

pagespeed_analyze_batch
Read-onlyIdempotent

Analyze 1–10 URLs in parallel and return per-page results plus success/failure counts, enabling batch PageSpeed checks across multiple pages.

Instructions

Analyze 1–10 URLs in parallel (bounded by concurrency) and return per-page results plus success/failure counts. Use pagespeed_analyze_page for one URL or pagespeed_compare_pages for a direct comparison. Progress notifications are emitted when supported by the client.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "urls": "<urls>"
    },
    "name": "pagespeed_analyze_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsYesOne to ten http(s) URLs.
engineNoAnalysis engine: auto (default, uses local Lighthouse for localhost/private URLs and Google PSI for public URLs), psi, or local.
localeNoBCP-47 locale such as en or uk-UA.en
reportNoPer-page result detail.summary
strategyNoLighthouse device profile. mobile is the default.mobile
categoriesNoLighthouse categories to request.
extraHeadersNoOptional HTTP headers (for example Authorization or Cookie) passed when running local Lighthouse against protected staging sites.
responseFormatNomarkdown is concise and readable; json is machine-readable and is also available as structuredContent.markdown

Output Schema

NameRequiredDescriptionDefault
toolYes
resultYes
truncatedNo
truncationMessageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.5.0
    • changedInput schema / properties / categories / items / enum
      Previous value: -[
      -  "performance",
      -  "accessibility",
      -  "best-practices",
      -  "seo",
      -  "pwa"
      -]New value: +[
      +  "performance",
      +  "accessibility",
      +  "best-practices",
      +  "seo"
      +]
    • addedInput schema / properties / engine
      Added value: +{
      +  "description": "Analysis engine: auto (default, uses local Lighthouse for localhost/private URLs and Google PSI for public URLs), psi, or local.",
      +  "enum": [
      +    "auto",
      +    "psi",
      +    "local"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / extraHeaders
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "Optional HTTP headers (for example Authorization or Cookie) passed when running local Lighthouse against protected staging sites.",
      +  "type": "object"
      +}
    • changedInput schema / properties / urls / description
      Previous value: -"One to ten public http(s) URLs."New value: +"One to ten http(s) URLs."
    • changedInput schema / properties / urls / items / description
      Previous value: -"Public http(s) URL, for example https://example.com/products."New value: +"Public or local http(s) URL, for example https://example.com/products or http://localhost:3000."
  2. Addedv2.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld/non-destructive, and the description adds genuinely new behavior: concurrency bounding and progress notifications when the client supports them. It stops short of saying what happens when some URLs fail (abort vs. partial results) or whether failures still consume quota, which matters for an openWorld tool.

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?

Three tight sentences, front-loaded with the core capability, then the disambiguation, then the notification caveat. Nothing is repeated from the schema and nothing is filler.

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 an output schema present, the description needn't explain return values, and it correctly omits them while covering batch semantics and alternatives. The remaining gap is failure-mode behavior across a 10-URL batch, which an agent would want before committing a large request.

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 eight parameters including the engine and extraHeaders semantics are already documented. The description only echoes the 1–10 URL bound and adds no syntax or interaction detail beyond the schema, so the baseline of 3 applies.

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 (analyze 1–10 URLs in parallel) plus the shape of the output (per-page results with success/failure counts). It also distinguishes itself from the single-URL and comparison siblings, so an agent can pick it without opening the schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: pagespeed_analyze_page for one URL, pagespeed_compare_pages for a direct comparison. The batch case is implicitly the remainder, which is exactly the right division of labor.

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