Skip to main content
Glama

viewport_resize

Idempotent

Resize the Chrome window to mobile, tablet, or desktop presets, or set custom dimensions to test responsive layouts. Also reports the current viewport size.

Instructions

Resize the Chrome window to a preset (mobile 375x812, tablet 768x1024, desktop 1440x900) or to explicit dimensions. The rendered viewport ends up smaller than what you ask for, by the height of the browser chrome — measure it with execute_js if the exact number matters. width and height each override the corresponding half of the preset, so preset plus width gives a custom width at the preset height. 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
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
Behavior5/5

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

The description discloses important non-obvious behavior: the rendered viewport is smaller than requested by the browser chrome height, and a maximized window on ChromeOS ignores the request. It also explains the override semantics for width/height. With annotations already declaring idempotentHint and non-destructive, the description adds valuable context beyond the structured fields.

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 sentences, each with a purpose: main functionality, viewport nuance, and override semantics plus a platform caveat. Front-loaded with the action, no filler words. Efficient and well-structured.

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 an 8-parameter tool with no output schema, the description covers the core behavior, edge cases (browser chrome, ChromeOS maximized), and parameter relationships. Combined with the fully-described schema, it provides enough context for an agent to use the tool correctly. It omits action=get details, but those are in the schema.

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 input schema already provides descriptions for all 8 parameters (100% coverage), so the baseline is 3. The description adds meaning by explaining the relationship between presets and overrides ('preset plus width gives a custom width at the preset height') and the viewport vs window distinction, which affects how to interpret width/height. However, it doesn't elaborate on top/left/tab_id, which rely on schema descriptions.

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 opens with a specific verb+resource: 'Resize the Chrome **window** to a preset ... or to explicit dimensions.' It clearly distinguishes from sibling tools like set_zoom (zoom) and window_layout/tile_windows (window arrangement) by focusing on window size. It also clarifies the window-vs-viewport distinction, which is central to the tool's name.

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?

The description gives clear context: presets are listed, width/height override preset, and it warns about the ChromeOS maximized window behavior. It mentions using execute_js to measure the exact viewport, which is a cross-reference to a sibling tool. However, it doesn't explicitly state when to prefer this over alternatives or provide exclusion criteria, so it's clear but not explicit about alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/frsorrentino/chrome-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server