Skip to main content
Glama
andresolbach

nodriver-mcp-server

Resize page

resize_page
Idempotent

Resize the browser window to exact dimensions for responsive-layout testing and accurate screenshots.

Instructions

Resize the browser window so the page gets the given dimensions.

Moves the actual OS window, which is what you want for responsive-layout checks that should also come out right in a screenshot.

To emulate a viewport size without touching the window — including device pixel ratio, the mobile flag and touch — use emulate's viewport parameter or emulate_device. Those are what a site's media queries and fingerprinting read as a genuine device change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYesTarget page width in CSS pixels.
heightYesTarget page height in CSS pixels.
browserNoWhich browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.default

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.0
    • addedInput schema / properties / browser
      Added value: +{
      +  "default": "default",
      +  "description": "Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.",
      +  "type": "string"
      +}
  2. First observedv1.7.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already provide idempotentHint=true and destructiveHint=false, but the description adds meaningful behavioral context: the actual OS window is moved, which affects screenshots, and this is not a genuine device-emulation change for media queries or fingerprinting. This is valuable and does not contradict the 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 compact and front-loaded: the first sentence states the core action, the second explains the practical use case, and the third routes to alternatives. There is no filler or repetition of schema content.

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 a simple resizing tool with an output schema present, the description sufficiently covers behavior, use case, and exclusions. An agent can correctly decide when to call it and what it will do without needing further details about return values or side effects.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents width, height, and browser thoroughly. The description does not add parameter-level detail, but it does not need to; the schema carries the full burden. This matches the baseline for complete schema coverage.

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 browser window so the page gets the given dimensions.' It also clearly distinguishes this tool from emulate and emulate_device by explaining that this one moves the actual OS window while those emulate viewport-like conditions. This makes sibling differentiation immediate and unambiguous.

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?

The description explicitly says when to use this tool: for responsive-layout checks that should also render correctly in screenshots. It also names alternatives—emulate's viewport parameter and emulate_device—for cases where the window should not be touched and device flags are needed. This gives an agent clear selection criteria among related tools.

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