Skip to main content
Glama

browser_viewport

Check a responsive layout in the current agent-owned tab. action=set with preset phone (390x844), tablet (768x1024) or desktop (1365x768), or width and height in CSS pixels, resizes the real browser window so the page reflows as it would…

Instructions

Check a responsive layout in the current agent-owned tab. action=set with preset phone (390x844), tablet (768x1024) or desktop (1365x768), or width and height in CSS pixels, resizes the real browser window so the page reflows as it would on that screen (Linux; elsewhere the window keeps its size). action=restore returns to the launch size and clears emulation; call it when the check is done. action=get reads the current size. action=emulate sets color_scheme (light or dark), reduced_motion, forced_colors or offline. A successful set or restore includes a fresh page snapshot; earlier element positions are stale after a resize, so use the new refs.

Input Schema

NameRequiredDescriptionDefault
clearNoemulate: clear all emulation.
widthNoset only, without preset: requested page-content width in CSS pixels.
actionYesget reads size and emulation; set applies a preset or width and height; restore returns to dynamic sizing and clears emulation.
heightNoset only, without preset: requested page-content height in CSS pixels.
presetNoset only: phone 390x844, tablet 768x1024, desktop 1365x768 (CSS pixels).
tab_idYesThe current agent-owned browser tab whose shared native window is targeted.
offlineNoemulate: fail every request in this browser context.
color_schemeNo
forced_colorsNo
reduced_motionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.6
    • changedInput schema / properties / preset / description
      Previous value: -"set only: the live view's profile sizes, phone 390x844, tablet 768x1024, desktop 1365x768."New value: +"set only: phone 390x844, tablet 768x1024, desktop 1365x768 (CSS pixels)."
  2. First observedv0.1.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description does substantial work: it discloses that set resizes the real browser window, that this only truly resizes on Linux ('elsewhere the window keeps its size'), that restore clears emulation, and that set/restore return a fresh snapshot making prior element refs stale. It omits whether other tabs sharing the native window are affected and any permission requirements.

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-loads the purpose, then walks through actions in a single dense paragraph with no filler. It is somewhat run-on — the emulate clause would read better as its own sentence — but every sentence carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter, four-action tool with no output schema, the description covers action behavior, platform caveat, snapshot return, and ref invalidation. Remaining gaps are minor: what get returns in detail and whether emulation persists until restore.

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?

Adds meaning beyond the 70%-covered schema: preset dimensions are restated in context, width/height are framed as CSS pixels used 'action=set without preset', and the emulate parameters are grouped by action. Some of this duplicates the schema enums (preset sizes appear in both), so the marginal gain is real but modest.

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?

Opens with a concrete verb+resource ('Check a responsive layout') and then enumerates all four actions (set, restore, get, emulate) with what each does. An agent can distinguish this from browser_screenshot or browser_observe because the focus is explicitly window resizing and device emulation rather than capture or interaction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear per-action usage: set for presets or custom dimensions, restore 'when the check is done', get for reading current size. It does not name alternatives or exclusions (e.g. when to prefer browser_screenshot or browser_evaluate instead), so it stops short of full routing guidance.

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