Skip to main content
Glama
yinnho

AginxBrowser

session_viewport

Set the session viewport for device emulation: adjust width/height, trigger media queries, and enable mobile pointer/hover behavior.

Instructions

Set the session's viewport (device emulation): scripts see innerWidth/innerHeight move, media queries like (max-width: 600px) re-evaluate, element rects re-anchor, and mobile=true flips pointer/hover matchMedia answers to coarse/none. Omitted width/height keeps the current value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNoViewport width in CSS pixels; omit to keep the current width
heightNoViewport height in CSS pixels; omit to keep the current height
mobileNoMobile emulation: matchMedia answers pointer:coarse / hover:none and navigator.maxTouchPoints reports 5 (default: false)
session_idYesSession ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.1
    • removedInput schema / title
      Removed value: -"SessionViewportParams"
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With annotations only providing a title, the description carries the behavioral burden and does so well: it reveals that scripts observe innerWidth/innerHeight changes, media queries re-evaluate, element rects re-anchor, and mobile flips matchMedia pointer/hover answers. It does not mention session prerequisites or persistence, but the core state-changing behavior is transparent.

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 dense sentences deliver high-signal information with no filler. The main action is front-loaded, followed by the most important behavioral effects and the omitted-parameter rule, making it easy for an agent to parse quickly.

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 state-mutating tool with a complete input schema and no output schema, the description explains the behavioral consequences well enough to invoke it correctly. It lacks explicit return-value or error/edge-case information, but those are not essential for a setter of this kind.

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% and each parameter already has a clear description. The tool description reinforces the semantics of omitted width/height preserving current values and describes the mobile flag's effect, but it does not add meaning substantially beyond what the schema already provides.

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 uses a specific verb ('Set') and resource ('the session's viewport'), and clearly distinguishes device emulation from a simple resize by enumerating the observable effects on scripts, media queries, and element rects. It also clarifies the mobile mode behavior, leaving no ambiguity about what the tool does.

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?

The description gives clear context for when to use this tool: when the session needs device emulation or viewport resizing, including media-query re-evaluation and pointer/hover emulation. It does not explicitly name alternatives or state when not to use it, but no direct sibling appears to overlap with this capability.

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