Skip to main content
Glama

browser_viewport

Check responsive layouts in the current agent tab. Set phone, tablet, desktop presets or custom CSS pixel sizes; emulate color scheme, reduced motion, forced colors, or offline, then restore.

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

TableJSON 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: the live view's profile sizes, phone 390x844, tablet 768x1024, desktop 1365x768.
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. First observedv0.1.1

TDQS

A4.6/5.0
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 does so: it discloses that resizing only affects the real window on Linux and elsewhere the window keeps its size, that a successful set/restore returns a fresh page snapshot, that earlier element positions become stale and new refs must be used, and that restore clears emulation.

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?

It is front-loaded with the primary purpose and walks through actions in order, but the single long paragraph is dense and the clause about Linux vs elsewhere is easy to miss.

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 10-parameter emulation tool with no output schema, the description covers the important behavioral details an agent needs: tab ownership context, per-action intent, platform-specific behavior, snapshot return, and ref staleness. Nothing material 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?

The schema already documents most parameters, but the description adds specifics beyond it: the concrete preset dimensions were listed in the description body, and it clarifies semantics of set vs emulate vs restore. Schema coverage is 70% with 5 enums, so it complements rather than repeats the schema.

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 names the specific operation (resize the real browser window for responsive-layout checks) and enumerates each action verb with its resource. It differentiates itself from layout-inspection siblings like browser_screenshot and browser_observe by scoping to viewport sizing and emulation.

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?

It gives clear contextual guidance for each action (set for resizing, restore when the check is done, get for reading). It does not name alternative sibling tools or explain when not to use this one, so it falls short of a 5.

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