Skip to main content
Glama
Considus

pagespeed-insights-mcp

Compare to baseline

compare_to_baseline
Destructive

Measures a URL's PageSpeed performance now and compares it against a saved baseline to verify whether a change actually helped, reporting only differences outside the noise range.

Instructions

Use to answer "did that change actually help"; for a one-off measurement with nothing to compare against use analyse_page. Measures now and compares against a saved baseline for the same URL and strategy. THE FIRST CALL ON A URL RECORDS THE BASELINE and compares nothing, which is the correct answer before anything has changed, and a call after the change compares against it. A verdict is only given where the two min-max ranges do NOT overlap: on an unchanged page the performance score has been measured running 27 to 37 and Total Blocking Time 824ms to 3.05s, so comparing medians alone reports improvements that are just the instrument moving. Where a change is real it reports both the difference in medians and the smaller figure the ranges actually guarantee, and the guaranteed one is the figure the measurement supports. Also reports which findings stopped and started failing, and flags a Lighthouse version change, which moves scores without the page moving. Does NOT compare field data, which is a 28-day window and cannot show a change made this week. SLOW, several minutes: it returns a JOB ID and you collect the verdict with get_job_result.

Input Schema

NameRequiredDescriptionDefault
runsNoDistinct analyses each side. Default 3.
urlsNoAbsolute http(s) URLs. Defaults to saved URLs.
strategyNoPart of the baseline identity. Default mobile.
save_baselineNoReplace the baseline with this measurement. Default false, so repeated calls keep comparing against the same starting point.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses the min-max overlap rule for verdicts, the instrument-noise figures (27–37 score, 824ms–3.05s TBT), that it reports both median difference and guaranteed difference, that it flags Lighthouse version changes, and that it is slow (minutes) and async, returning a JOB ID collected via get_job_result. The baseline-writing behavior is consistent with destructiveHint=true and idempotentHint=false.

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 use case and the exclusion, then layered detail. It is long, and the statistical-noise paragraph is dense, but nearly every sentence carries decision-relevant information. Slight over-length keeps it from a 5.

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 slow async tool with no output schema, the description supplies the async contract (JOB ID → get_job_result), the verdict semantics, the failure/version-change caveats, and what is out of scope (field data). Nothing an agent needs to call it or interpret the result is missing.

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 is 3. The description adds real meaning beyond it: strategy is part of the baseline identity, and repeated calls keep comparing against the same starting point unless the baseline is replaced. It doesn't elaborate on runs, but the schema already defines it.

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: measures now and compares against a saved baseline for the same URL and strategy, framed around the question it answers ('did that change actually help'). It explicitly names the sibling it is not (analyse_page for one-off measurements), so an agent can discriminate without opening a 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?

Gives explicit when-to-use (after a change), when-not (one-off measurement → analyse_page; field data cannot show a change made this week), and the critical first-call semantics (first call records the baseline and compares nothing). This is as close to a decision rule as a description gets.

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