Skip to main content
Glama

browser_resize

Resize the active browser page viewport to a specified width and height, optionally targeting a specific session, so AI agents can test responsive layouts and emulated screen sizes.

Instructions

Resize the active browser page viewport in the target session.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "width": "<width>",
      "height": "<height>"
    },
    "name": "browser_resize"
  }
}

Input Schema

NameRequiredDescriptionDefault
widthYesViewport width in pixels.
heightYesViewport height in pixels.
sessionIdNoOptional target browser session ID. If omitted, uses the currently active session (or auto-launches one).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

C2.9/5.0
Behavior2/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 not disclose whether resizing persists across navigations, affects existing screenshots/recordings, resets scroll position, or what happens if no page is open. It also omits the auto-launch side effect, which is only visible in the schema's sessionId text.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no redundant or filler wording. It is efficient, though so terse that the missing context reads as under-specification rather than deliberate brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, has only three well-documented parameters, and no output schema, so the schema does most of the work. However, for a state-mutating browser tool with zero annotations, the description should clarify persistence and preconditions (active page, session handling).

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 width, height, and sessionId semantics are already fully documented, setting the baseline at 3. The description adds only a light restatement of the session targeting concept, nothing beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and object ('Resize the active browser page viewport') plus scope ('in the target session'), which is unambiguous and clearly distinct from siblings like browser_emulate or browser_take_screenshot. It stops short of naming any sibling to contrast with, so it lands at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to call this instead of alternatives such as browser_emulate (device/viewport emulation) or whether an active page must already exist. The only usage hint is the implicit 'active ... target session' framing, leaving the agent to infer context.

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