Skip to main content
Glama

Bulk PageSpeed / Lighthouse audit

audit_pagespeed
Read-onlyIdempotent

Run Google PageSpeed Insights (Lighthouse) on a list of URLs, a sitemap, or a same-domain crawl, on mobile and/or desktop, with aggregated scores. Requires your own free Google PageSpeed Insights API key (googleApiKey, or the GOOGLE_PSI_API_KEY environment variable when running locally). Each URL x device is one billed audit.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "audit_pagespeed"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsNoPages to audit.
dryRunNoPreview with built-in sample data; no website is contacted and the cost is minimal.
strategyNoDevices to test (default mobile).
maxAuditsNoSafety cap on audits (default 20 here).
maxCostUsdNoOptional hard cap in USD for this call. The underlying Actor stops when the cap is reached. Minimum 0.05 (the Apify per-run minimum). Default: a small amount computed from the number of URLs, never below 0.05.
sitemapUrlsNoSitemap URLs to discover pages from.
googleApiKeyNoYour Google PageSpeed Insights API key (free).
maxCrawlPagesNoMax pages from the crawl (default 20).
crawlStartUrlsNoStart pages for a same-domain crawl.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint and destructiveHint=false, and the description does not contradict them — it reinforces the open-world nature by naming the external Google PSI call. Beyond annotations it adds two genuinely useful facts: an auth prerequisite (own free API key) and a billing model ('each URL x device is one billed audit'), which explains the cost multiplier an agent must reason about.

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 action and input modes in the first sentence, then prerequisites, then cost in a short third sentence — no filler. It is dense with parentheticals (API key aliases) but every clause carries operational information.

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 9-parameter, zero-required, no-output-schema tool, the description covers the essential decision inputs: what can be audited, on which devices, what credential is needed, and how cost scales. Missing only secondary details such as runtime expectations or whether a failed URL aborts the batch, which the schema's safety caps partially mitigate.

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 coverage is 100%, so the baseline would be 3, but the description adds meaning not in the schema: the env-var fallback for googleApiKey and the cost-multiplier rule tying urls/strategy together into per-audit billing. It also signals that urls, sitemapUrls and crawlStartUrls are alternate input modes rather than mutually required fields.

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 Google PageSpeed Insights (Lighthouse)') plus the three accepted input modes (URL list, sitemap, same-domain crawl), devices, and the returned artifact ('aggregated scores'). An agent can tell this apart from audit_accessibility or audit_schema_ai_readiness from the description alone.

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 invocation context: three alternative input paths, mobile/desktop selection, and the prerequisite of an API key or GOOGLE_PSI_API_KEY env var. It stops short of explicit exclusions or naming which sibling audit to pick for accessibility/SEO-type checks, so the when-not guidance is absent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.