Skip to main content
Glama

Mouse, keyboard and screenshots

computer

Drive a Zen browser tab via mouse and keyboard actions and screenshots to click, type, scroll, drag, and inspect page elements.

Instructions

Use a mouse and keyboard to interact with the page in a Zen tab, and take screenshots. If you don't have a valid tab ID, use tabs_context first.

  • Before clicking, consult a screenshot to find coordinates, or use a ref from read_page/find (preferred: refs are scrolled into view automatically and work inside iframes).

  • Click in the centre of elements, not on their edges.

  • Coordinates are in the pixel frame of the latest screenshot (its size is reported with every screenshot).

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": {
      "action": "<action>",
      "tabId": "<tabId>"
    },
    "name": "computer"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoElement ref from read_page/find (e.g. "ref_12"). Alternative to coordinate for clicks/hover; required for scroll_to.
textNoText to type (type) or keys to press (key).
scaleNoscreenshot/zoom: shrink the returned image (coordinates stay in the full frame).
tabIdYesTab ID from tabs_context / tabs_create.
actionYesleft_click/right_click/double_click/triple_click: click at coordinate or ref. type: type text. key: press keys (space separated, e.g. "ctrl+a Backspace"; use cmd on macOS). screenshot: capture the viewport. wait: pause for duration seconds. scroll: wheel-scroll at coordinate. scroll_to: scroll a ref into view. left_click_drag: drag from start_coordinate to coordinate. hover: move the mouse to coordinate or ref. zoom: capture a region at full resolution.
regionNo(x0, y0, x1, y1) region for zoom, in screenshot pixels.
repeatNoRepeat count for key.
durationNoSeconds to wait (wait action, max 10).
modifiersNoModifier keys held during a click: "ctrl", "shift", "alt", "cmd"/"meta", combinable with "+" (e.g. "ctrl+shift").
coordinateNo(x, y) in screenshot pixels. Required for coordinate clicks and scroll; end point for left_click_drag.
save_to_diskNoscreenshot/zoom: also save the image to disk and return its path.
scroll_amountNoWheel ticks (default 3, ≈100px each).
action_summaryNoA few words describing the effect of this action (shown in logs).
scroll_directionNo
start_coordinateNo(x, y) start point for left_click_drag.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior4/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 well: it discloses the coordinate reference frame ('pixel frame of the latest screenshot, its size is reported with every screenshot'), the iframe behavior of refs, auto scroll-into-view, and a precision rule (click centres, not edges). It omits failure/retry behavior and timing expectations for actions like wait or post-click settling, which keeps it short of a 5.

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?

One lead sentence followed by three short bullets, each carrying a distinct rule (prerequisite, coordinate strategy, click precision, frame semantics). No repetition of schema content and no filler.

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 15-parameter, 13-action tool with no annotations and no output schema, the description covers the decisions that matter: which tab ID source to use, refs over coordinates, and the coordinate frame. It does not describe what a screenshot or zoom response contains, but the schema fields (scale, region, save_to_disk) plus 'size is reported with every screenshot' mostly compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 93%, so the per-parameter text already documents most fields, setting a baseline of 3. The description adds real meaning on top: the ref-vs-coordinate tradeoff and the fact that coordinates are relative to the latest screenshot frame, which resolves the main ambiguity in the two coordinate parameters.

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 opening sentence states a specific verb set (mouse/keyboard interaction, screenshots) and the exact scope ('the page in a Zen tab'), which immediately separates it from text-extraction siblings like read_page or get_page_text. The bullet about refs versus screenshots further clarifies the interaction model.

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

Usage Guidelines5/5

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

It gives explicit prerequisites ('If you don't have a valid tab ID, use tabs_context first') and an explicit alternative with a stated preference ('consult a screenshot to find coordinates, or use a ref from read_page/find (preferred...)'). It also states why the preferred path is better (refs auto-scroll into view and work inside iframes), leaving nothing to inference.

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