Skip to main content
Glama
Browser Session MCP

Browser Session MCP

set_emulation

Idempotent

Throttle CPU and network for a browser session to simulate slow phones or connections, so you can measure load time, hydration, layout shift, and flaky taps across all tabs.

Instructions

Throttle the session's CPU and/or network to measure a page as a slow phone or connection sees it (load time, hydration, layout shift, flaky taps). Applies to every tab of the session, open now or opened later (popups included), and lasts until changed or the session closes; it is in place when this returns, so navigate right after. Omitted fields keep their current value. Typical mid-range phone: cpuThrottlingRate 4 with network "slow4g" and useMobileUA on open_browser_session. Pass cpuThrottlingRate 1 and network "off" to stop throttling. Needs the listener role; fails if no tab confirms within 5s.

Input Schema

NameRequiredDescriptionDefault
networkNoA preset ("slow3g", "slow4g", "fast4g" as in Chrome DevTools, "offline", or "off" for none) or custom {latencyMs, downloadKbps, uploadKbps}.
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.
cpuThrottlingRateNoCPU slowdown factor from 1 (none) to 100. 4 is a mid-range phone, 6 a low-end one.

Output Schema

NameRequiredDescriptionDefault
networkNoNetwork throttling; null means none.
initScriptsYes
cpuThrottlingRateYesCPU slowdown factor; 1 means none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.18

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing scope (all tabs, current and future, including popups), lifetime (persists until changed or the session closes), synchronous application before return, the required listener role, and the 5s confirmation failure mode. The only gap is that it does not say what the return payload contains or how a partial failure across tabs is reported.

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 core action, then scope, lifetime, timing, and configuration in a logical progression with no filler. It is dense — a single long paragraph mixing setup, semantics, and operational constraints — but essentially every clause carries actionable information.

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?

An output schema exists, so return values need not be described; the description instead covers everything else an agent needs: prerequisites (listener role), timing guarantees, persistence scope, failure behavior, and a reset path. For a session-wide state mutation this is complete.

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 already 100%, so the baseline is 3; the description earns extra credit by adding the crucial merge semantic 'Omitted fields keep their current value,' which is not expressed in the schema and materially changes how an agent should call it. It also supplies real-world reference values (4 = mid-range phone, 6 = low-end) that complement the schema's range note.

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 ('Throttle the session's CPU and/or network') plus the intent ('measure a page as a slow phone or connection sees it'), with concrete symptoms it enables (load time, hydration, layout shift, flaky taps). This clearly distinguishes it from get_emulation, the read-side sibling, without naming it.

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 on mobile/slow connections), a recommended configuration ('cpuThrottlingRate 4 with network "slow4g" and useMobileUA on open_browser_session'), and an explicit reversal recipe ('cpuThrottlingRate 1 and network "off"'). It also states the sequencing rule ('navigate right after') that would otherwise be a common mistake.

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