Skip to main content
Glama

browser_set_viewport

Set the browser viewport to specific width and height dimensions, up to 3840x2160, for testing responsive designs across various screen sizes.

Instructions

Set an arbitrary viewport size on the current browser session (width/height integers; max 3840x2160). Requires lease_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYes
heightYes
lease_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Annotations provide no safety hints (all false), so the description must disclose behavioral details. It adds the max 3840x2160 limit and the need for lease_id, but does not clarify side effects, persistence, or interaction with browser state (e.g., whether it affects subsequent snapshots or actions).

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 single, front-loaded sentence that wastes no words. Every clause adds information: action, scope, integer nature, max constraint, and prerequisite.

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 viewport setter, the description covers the essential behavior and constraint. The existence of an output schema likely handles return values. However, it does not mention edge cases like invalid dimensions or the need for an active session beyond lease_id, which might be relevant.

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?

The input schema has zero descriptions for parameters, so the description must compensate. It explains width/height are integers and sets a max, and reminds about lease_id, but does not elaborate on units or semantics beyond the obvious. The max constraint is useful, but the description largely restates schema requirements (lease_id is already marked required).

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 clearly states the tool sets an arbitrary viewport size on the current browser session, with a specific verb (Set), resource (viewport size), and scope (current browser session). It also adds the max dimension constraint, distinguishing it from related browser tools like browser_action or browser_open.

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 implies usage is for changing viewport dimensions on an active browser session, but it does not explicitly state when to use this tool versus alternatives, nor does it mention exclusions (e.g., if the browser is not open). The requirement for lease_id is mentioned, but no guidance on session prerequisites is given beyond that.

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/davidlosasgonzalez/codeagent-mcp'

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