Skip to main content
Glama

set_viewport

Resize the browser viewport to test responsive layouts with device presets or custom dimensions, then capture a screenshot for verification.

Instructions

Change the viewport size of a session page to test at different screen sizes. Use device presets or custom width/height. Takes a screenshot after resizing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNoViewport width in pixels (custom size)
deviceNoDevice preset: mobile_sm (320x568 iPhone SE), mobile (375x812 iPhone 12), mobile_lg (428x926 iPhone 14 Pro Max), tablet (768x1024 iPad), tablet_lg (1024x1366 iPad Pro), laptop (1366x768), desktop (1920x1080), desktop_lg (2560x1440)
heightNoViewport height in pixels (custom size)
session_idYesSession ID
Behavior4/5

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

Discloses that a screenshot is taken after resizing, a key behavioral trait. No annotations exist, so description carries full burden; it adequately covers the side effect.

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, no redundancy, front-loaded with purpose. Every sentence earns its place.

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 viewport resizing tool with 4 parameters (1 required), description covers core functionality and side effect. Lacks mention of page load behavior but is complete enough.

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%, so baseline is 3. Description reinforces the choice between presets and custom sizes but doesn't add new meaning beyond the schema.

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?

Description uses specific verb 'change' and resource 'viewport size of a session page', clearly stating purpose for responsive testing. Distinguishes from sibling tools like test_responsive by focusing on viewport manipulation.

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?

Provides guidance on using device presets or custom dimensions, but lacks explicit when-not-to-use or alternatives among siblings. The intent is clear enough.

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/segentic-lab/periscope-mcp'

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