Skip to main content
Glama
Browser Session MCP

Browser Session MCP

measure_page

Reload the active tab or load a URL, then return Core Web Vitals, load timings, and resource breakdowns rated good, needs improvement, or poor. Use it to diagnose page speed.

Instructions

Measure how fast a page loads, like a small Lighthouse performance run, in the session as it is: its login, device and throttling (set_emulation). 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).
fcpMsNoFirst contentful paint.
lcpMsNoLargest contentful paint, and the element it was.
tbtMsNoTotal blocking time: long tasks' time past 50 ms, after first paint.
byHostYes
byTypeYes
loadMsNo
ttfbMsNoTime to the first byte of the page from the server.
largestYes
ratingsNoEach 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.
lcpElementNo
longestTaskMsNo
domContentLoadedMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.23

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false), the description discloses that it reloads the active tab, waits for requests to go quiet, and destroys unsaved page state — the most important behavioral consequence. It does not mention failure modes for the 25s timeout cap or what happens on navigation errors, which keeps it short of a 5.

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?

Purpose and session context are front-loaded, then behavior, then the alternative, then the risk warning — a sensible order with no filler sentences. The long enumerated list of returned metrics is somewhat redundant given an output schema exists, costing tokens without adding selection value.

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 that is non-idempotent, session-scoped and state-affecting, the description covers what it does, what state it changes, which context it inherits, and which sibling to use instead. Return values need not be explained because an output schema is present, so nothing an agent needs to call it correctly 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 meaning by explaining that the session context (login, device, throttling via set_emulation) governs the measurement, which the schema does not convey about sessionId. The url override and timeout are left to the schema, which already documents them well.

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 page load performance) and immediately bounds it with an analogy ("like a small Lighthouse performance run") plus the enumerated metric families it produces. The scope is further pinned to the current session's login/device/throttling, so an agent can distinguish it from generic navigation or profiling tools 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?

Explicitly routes the agent away to a named sibling: "Use start_profiling instead to find which JavaScript is slow," which is a clear alternative-plus-condition. It also gives the precondition (session inherits login, device and throttling from set_emulation) and a when-not warning that reloading loses unsaved page state.

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