Skip to main content
Glama

set_viewport_size

Sets the viewport width and height in pixels for the currently selected Firefox tab, enabling precise layout and responsive testing.

Instructions

Set viewport dimensions in pixels. Applies to the selected tab only.

Input Schema

NameRequiredDescriptionDefault
widthYesWidth in pixels
heightYesHeight in pixels

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.0.0
    • changedInput schema / properties / height / description
      Previous value: -"Viewport height in pixels"New value: +"Height in pixels"
    • changedInput schema / properties / width / description
      Previous value: -"Viewport width in pixels"New value: +"Width in pixels"
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=false, so the description carries most of the burden. It usefully discloses that the change is scoped to the currently selected tab and not global, but it says nothing about persistence (does it survive navigation or a new_page?), whether it affects screenshots, or what happens with invalid/zero dimensions.

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?

Two short sentences, zero waste, with the core action front-loaded and the scoping caveat second. Nothing could be removed without losing information.

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 simple two-parameter mutation with a complete schema and no output schema, the description covers the essential action and its per-tab scope. Remaining gaps (persistence, validation behavior) are minor for a viewport-setting tool.

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 coverage is 100% and both parameters are already documented with units, so the schema does the heavy lifting. The description's "in pixels" merely repeats the schema and adds no constraints such as minimum/maximum or device-pixel-ratio semantics.

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?

States a specific verb and resource: set viewport dimensions in pixels. This is unambiguous and there is no sibling tool in the list that does anything similar, so no differentiation is required. It stops short of 5 only because it doesn't describe the effect on the rendered page or screenshots.

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?

"Applies to the selected tab only" implicitly tells the agent that a tab must be selected first (i.e., select_page is a prerequisite), which is useful routing context. However, there is no explicit when-to-use vs when-not guidance, and no mention of alternatives or of whether the setting persists across navigations.

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