Skip to main content
Glama
emadklenka

mare-browser-mcp

by emadklenka

browser_emulate_device

Emulate any iPhone, iPad, or Android device in the browser to test responsive layouts. Preserves auth state and returns to the current page after swapping devices.

Instructions

Switch the browser session into a device emulation profile (iPhone / iPad / Android tablet / desktop reset / custom). Emulation lives on the browser context — it persists across browser_navigate calls until you swap to another device or call browser_restart.

IMPORTANT behaviors: • Swapping devices recreates the browser context but cookies + localStorage are PRESERVED (via persistent storageState). Pages behind auth stay logged in across swaps. The tool auto-navigates back to the URL you were on. IndexedDB is not preserved — PWAs that store auth tokens there may require re-login. • innerWidth: 980 on a mobile emulation is NOT a bug. It means the current page has no and is using Chrome's legacy fallback. Check verified.layout_mode — it will be "legacy-980-fallback" in this case. The authoritative signals that emulation is working are: userAgent, pointer_coarse, hasTouch, devicePixelRatio. • browser_restart always clears emulation (back to desktop). • Not supported in REAL_CHROME mode (returns an error).

Presets and natural viewports (portrait): • iphone-15-pro-max (430×932), iphone-15-pro (393×852), iphone-15 (393×852), iphone-se (375×667) • galaxy-s24 (360×800) • ipad-pro-13 (1024×1366), ipad-pro-11 (834×1194), ipad-mini (768×1024) • galaxy-tab-s9 (800×1280) • desktop-chrome (1280×800, DPR 1, no touch — use this to reset) • custom — requires custom.userAgent + custom.viewport.{width,height}

Returns { ok, active, previous_url, previous_url_restored, verified, checks, warnings? }. ok: true as long as the essential fields (UA substring + devicePixelRatio) match; soft drift in hasTouch or pointer_coarse surfaces as warnings[] without flipping ok. On hard failure: { ok: false, error, verified, checks }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customNoRequired iff device === 'custom'. Must include userAgent and viewport.{width,height}.
deviceYesDevice preset key, or 'custom' to supply your own options.
orientationNoOptional. Defaults to the device's natural orientation. Swaps viewport + screen width/height.
Behavior5/5

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

With no annotations, the description carries the full burden and exceeds it: it details context recreation, cookie/localStorage preservation, IndexedDB loss, auto-navigation back, the innerWidth:980 fallback, and authoritative verification signals. Return value behavior and warnings are thoroughly explained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Though long, the description is well-structured with clear bullets and sections. The opening sentence is concise, and every bullet adds necessary behavioral or preset information. No fluff.

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?

No output schema exists, but the description explains return fields and verification semantics. No annotations exist, but the description covers all important edge cases (auth persistence, viewport fallback, error conditions). For a complex tool with nested custom parameters, 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 100%, so baseline is 3. The description adds value beyond the schema by listing concrete viewport dimensions for each preset and reiterating custom requirements, making parameter selection easier.

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?

The description opens with a specific verb and resource: 'Switch the browser session into a device emulation profile' and enumerates exact presets (iPhone, iPad, Android tablet, desktop reset, custom). It clearly distinguishes from siblings by noting persistence across browser_navigate and that browser_restart clears emulation.

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?

Explicit use cases are given: when to use device emulation, which preset to use for reset (desktop-chrome), and an exclusion ('Not supported in REAL_CHROME mode'). The persistence and auth behavior also inform when to use this tool versus browser_restart.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emadklenka/mare_browser_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server