Skip to main content
Glama
Browser Session MCP

Browser Session MCP

measure_page

Measures page load performance in the active browser session by reloading it or loading a URL, returning Core Web Vitals, timing, request, and resource metrics rated against standard thresholds.

Instructions

Measure how fast a page loads, like a small Lighthouse performance run, in the session as it is: its login, device and throttling (configure_session). Reloads the active tab (or loads url), waits for its requests to go quiet, and returns server response time, first and largest contentful paint (and the element it was), cumulative layout shift, total blocking time from long tasks, DOMContentLoaded and load times, requests and bytes by type and host, and the largest resources, each metric rated good, needs improvement or poor by the Core Web Vitals and Lighthouse thresholds. Use start_profiling instead to find which JavaScript is slow. Reloading loses unsaved page state.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "measure_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoLoad this URL instead of reloading the current page.
timeoutNoMilliseconds to wait for the load and for its requests to go quiet, at most 25000. Default 20000.
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.

Output Schema

NameRequiredDescriptionDefault
clsYesCumulative layout shift.
urlYes
bytesYesBytes transferred (cross-site resources without timing headers count 0).
fcpMsYesFirst contentful paint.
lcpMsYesLargest contentful paint, and the element it was.
tbtMsYesTotal blocking time: long tasks' time past 50 ms, after first paint.
byHostYes
byTypeYes
loadMsYes
ttfbMsYesTime to the first byte of the page from the server.
largestYes
ratingsYesEach metric as good, needs improvement or poor, by the Core Web Vitals and Lighthouse thresholds.
requestsYes
longTasksYes
conditionsYesThe session's device and throttling during the load.
lcpElementYes
longestTaskMsYes
domContentLoadedMsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • changedOutput schema / required
      Previous value: -[
      -  "url",
      -  "conditions",
      -  "cls",
      -  "longTasks",
      -  "requests",
      -  "bytes",
      -  "byType",
      -  "byHost",
      -  "largest"
      -]New value: +[
      +  "url",
      +  "conditions",
      +  "ttfbMs",
      +  "fcpMs",
      +  "lcpMs",
      +  "lcpElement",
      +  "cls",
      +  "tbtMs",
      +  "longTasks",
      +  "longestTaskMs",
      +  "domContentLoadedMs",
      +  "loadMs",
      +  "requests",
      +  "bytes",
      +  "byType",
      +  "byHost",
      +  "largest",
      +  "ratings"
      +]
  2. Addedv0.1.23

TDQS

A4.6/5.0
Behavior4/5

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

Annotations cover readOnly=false, destructive=false and openWorld=true, but do not convey that the tool reloads the active tab and discards unsaved page state — the description does. It also discloses the wait semantics (requests going quiet) and the timeout ceiling. The only thing left unstated is roughly how output is ordered/paginated, which the existing output schema covers.

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?

The critical behavioral warning and the sibling routing are front-loaded and no sentence is filler. The long enumeration of returned metrics is somewhat redundant given a dedicated output schema exists, which keeps it from a perfect score.

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 three-parameter, side-effect-bearing measurement tool with an output schema, the description covers purpose, session inheritance, side effects, timeout behavior and the alternative. Nothing an agent needs in order to call it safely is absent.

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 description coverage is 100%, so the baseline is 3; the description earns above that by explaining that `url` substitutes for reloading the active tab and that `timeout` governs both the load and the quiescence wait. The mention that the session supplies login, device and throttling gives real meaning to `sessionId` beyond its schema text.

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 ('measure how fast a page loads') and anchors it with a concrete analogy to a Lighthouse performance run. Crucially it also delimits scope against a sibling ('Use start_profiling instead to find which JavaScript is slow'), so an agent can discriminate the two without opening either 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 (performance measurement inheriting the session's login, device and throttling from configure_session) and explicit when-not (JavaScript profiling belongs to start_profiling). It also warns that reloading loses unsaved page state, which is the main precondition an agent must weigh before calling.

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