Skip to main content
Glama

resize

Set a tab's viewport to a specific size in CSS pixels to test responsive layouts on phone, tablet, or desktop. Emulates the size within the page without resizing the browser window.

Instructions

Set the tab's viewport to a given size in CSS pixels, to test responsive layouts (e.g. 390x844 phone, 768x1024 tablet, 1440x900 desktop). It emulates the size inside the page and does not move or resize the browser window. Applies to this tab until the browser is closed or you resize again; reload may be needed for layouts that read the size on load. Returns the size set; width and height must be positive. Screenshots afterwards use the new size.

Input Schema

NameRequiredDescriptionDefault
tabNoTab id from tabs_list. Defaults to the current tab.
widthYesViewport width in CSS px, e.g. 390.
heightYesViewport height in CSS px, e.g. 844.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.2
    • changedInput schema / properties / height / description
      Previous value: -"Height in CSS px."New value: +"Viewport height in CSS px, e.g. 844."
    • changedInput schema / properties / width / description
      Previous value: -"Width in CSS px."New value: +"Viewport width in CSS px, e.g. 390."
  2. First observedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare it is not read-only and is open-world; the description supplies the substance — emulation happens inside the page rather than resizing the window, the size persists until browser close or the next resize, some layouts need a reload, and later screenshots use the new size. These are non-obvious stateful behaviors an agent could easily get wrong.

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?

Front-loaded with the action and purpose, then each subsequent clause adds a distinct operational fact (emulation scope, persistence, reload caveat, validation, screenshot impact). No redundant restatement of the name or schema.

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?

With no output schema, the description still says it returns the size set, and it covers validation, persistence, and downstream effects on screenshots. For a small three-parameter mutation tool, nothing an agent needs before calling 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?

Schema coverage is already 100% (tab defaults to current tab, width/height examples given), so baseline would be 3. The description adds a genuine constraint not in the schema: 'width and height must be positive,' which prevents an invalid invocation.

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?

States a specific verb and resource — set the tab's viewport to a given CSS-pixel size — and immediately scopes it with the use case (responsive layout testing) plus concrete examples. No sibling tool touches viewport sizing, so the boundary is unambiguous.

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?

Usage context is explicit: responsive layout testing with phone/tablet/desktop examples, and it clarifies this does not move or resize the browser window, steering the agent away from expecting OS-level behavior. It doesn't name alternatives, but none exist among the siblings for this capability.

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