Skip to main content
Glama

Set viewport

browser_set_viewport

Resize the browser viewport for responsive testing. Use desktop, mobile, or tablet presets, or set a custom width and height to check layouts at any screen size.

Instructions

Resize the browser viewport. Presets: desktop (1280x800), mobile (390x844, touch emulation), tablet (820x1180). Or pass custom width/height.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_set_viewport"
  }
}

Input Schema

NameRequiredDescriptionDefault
widthNoCustom width in px
heightNoCustom height in px
presetNoPreset size

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3-alpha.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does add genuine behavioral context by noting that the mobile preset includes touch emulation, a side effect not visible in the enum. But it omits whether a browser session must already be running, whether resizing affects existing tabs or reloads the page, and what the default call (no args) does.

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?

Three short sentences, front-loaded with the action, then presets, then the custom escape hatch. Every clause carries information and nothing is redundant.

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 simple three-optional-parameter tool with no output schema, the description covers the core action and preset values adequately. The remaining gaps are the no-argument default and session prerequisites, which are minor but would help an agent call it correctly on first attempt.

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, but the description adds real meaning beyond the schema by giving the concrete dimensions behind each enum value (desktop 1280x800, mobile 390x844, tablet 820x1180) and flagging touch emulation. It stops short of explaining how preset and width/height interact when both are given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Resize the browser viewport") and enumerates the three preset values, so an agent knows exactly what the tool acts on. It does not explicitly differentiate from siblings such as browser_mode or browser_start, though the resource is distinct enough that confusion is unlikely.

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

Usage Guidelines3/5

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

"Or pass custom width/height" implies a preset-vs-custom choice, which is useful implied guidance. However, it never states precedence when both are supplied, what happens when neither is supplied (required parameters = 0), or when to prefer this over a browser-mode/session-level alternative.

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