Skip to main content
Glama

viewport_resize

Idempotent

Resize the Chrome browser window to preset mobile, tablet, or desktop dimensions or specify custom pixel sizes. Also retrieve the current viewport size.

Instructions

Resize the Chrome window to a preset (mobile 375x812, tablet 768x1024, desktop 1440x900) or explicit dimensions; the viewport is smaller by the browser chrome, action=get reports the real one. width/height override half a preset. A maximized window on ChromeOS ignores the request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoWindow y on the virtual desktop
leftNoWindow x on the virtual desktop; on multi-monitor this is what picks the screen
zoomNoPage zoom for this origin, 1 = 100%; applied after the resize
stateNoApplied before bounds: a maximized window accepts left/top/width/height and ignores them
widthNoOverrides preset
actionNoget reports the current viewport without resizing anythingset
heightNoOverrides preset
presetNo375x812, 768x1024, 1440x900
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.16.1
    • addedInput schema / properties / zoom
      Added value: +{
      +  "description": "Page zoom for this origin, 1 = 100%; applied after the resize",
      +  "type": "number"
      +}
  2. Changed3 schema fields changedv1.15.0
    • addedInput schema / properties / left
      Added value: +{
      +  "description": "Window x on the virtual desktop; on multi-monitor this is what picks the screen",
      +  "type": "number"
      +}
    • addedInput schema / properties / state
      Added value: +{
      +  "description": "Applied before bounds: a maximized window accepts left/top/width/height and ignores them",
      +  "enum": [
      +    "normal",
      +    "maximized",
      +    "fullscreen",
      +    "minimized"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / top
      Added value: +{
      +  "description": "Window y on the virtual desktop",
      +  "type": "number"
      +}
  3. Changed1 schema field changedv1.11.0
    • addedInput schema / properties / action
      Added value: +{
      +  "default": "set",
      +  "description": "get reports the current viewport without resizing anything",
      +  "enum": [
      +    "set",
      +    "get"
      +  ],
      +  "type": "string"
      +}
  4. Changed1 schema field changedv1.10.0
    • addedInput schema / properties / tab_id / description
      Added value: +"Target tab; omitted = last tab navigated in this session, else the active one"
  5. First observedv1.8.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true), the description clarifies that the viewport is smaller by browser chrome, that action=get reports the real viewport without resizing, and that a maximized window on ChromeOS ignores the request. These are useful behavioral details not covered by annotations.

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 a tight three-sentence paragraph with no fluff. The main purpose is front-loaded, and every sentence adds relevant detail (presets, override behavior, viewport vs window, ChromeOS caveat).

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 tool with 9 parameters and no output schema, the description covers the core behaviors: resizing, presets, explicit dimensions, the get action, and the ChromeOS caveat. Parameters like top/left/tab_id are fully documented in the schema, so the description does not need to repeat them. The description is sufficient for an agent to invoke the tool correctly.

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?

With 100% schema coverage, the baseline is 3, but the description adds semantics: width/height override a preset, and action=get reports without resizing. These enrich understanding beyond the schema definitions.

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 (resize) and resource (Chrome window), defines preset dimensions, and distinguishes the viewport from the window. It implicitly differentiates from sibling layout tools like window_layout by focusing on viewport sizing, so an agent can tell it apart.

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?

The description gives usage conditions such as the maximized-window-on-ChromeOS caveat and the action=get behavior, but it does not explicitly compare to alternatives like window_layout or tile_windows. An agent must infer when to prefer this tool over those siblings.

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