Skip to main content
Glama

zerodom_set_viewport

Set the active page's viewport size to test responsive layouts at specified dimensions, overriding the rendered width and height without resizing the browser window.

Instructions

Resize the active tab's viewport for responsive-design testing.

Not the real browser window — that's zerodom_resize_window. This is Emulation.setDeviceMetricsOverride: the page's own rendered layout at a given width, without touching the chrome around it. Use this one for "how does this render at width X"; use zerodom_resize_window for an actually different-sized window on screen.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYes
heightYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.8

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 carries the full burden and does substantial work: it clarifies this is Emulation.setDeviceMetricsOverride, affects the page's rendered layout, and does not touch the browser chrome. It doesn't mention persistence or how to reset the override, but the core behavioral scope is clearly disclosed.

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?

The description is front-loaded with the core purpose and then immediately provides the key differentiation from the sibling tool. Every sentence adds value: scope, mechanism, and usage guidance.

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 two-parameter tool with an output schema, the description gives enough context to call it correctly and choose it over the sibling. The main gap is that height is not explicitly explained and reset/teardown behavior isn't mentioned, but these are minor for this use case.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the description only meaningfully explains width ('at a given width', 'renders at width X'). Height is left entirely to inference, and there is no note about units, value ranges, or how these map to the emulation behavior.

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 states a specific verb and resource: 'Resize the active tab's viewport' for responsive-design testing. It explicitly distinguishes itself from zerodom_resize_window, so an agent can tell which tool handles viewport emulation versus real window resizing.

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?

It provides direct routing guidance: use this tool for 'how does this render at width X' and zerodom_resize_window for a genuinely different-sized window. It also names the sibling tool explicitly and clarifies what this tool is not.

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