Skip to main content
Glama

click_and_hold

Press and hold at precise viewport coordinates for a set duration, letting FSB agents operate record buttons, long-press menus, and other sustained-mouse-press UI.

Instructions

Click and hold at specific viewport coordinates for a specified duration using CDP trusted events. Dispatches mousePressed, waits holdMs milliseconds, then dispatches mouseReleased at the same position. Coordinates are CSS pixels relative to the browser viewport. When to use: for record buttons, long-press menus, or any UI that requires sustained mouse press. Related: click_at (simple click without hold), drag (click, move, and release for dragging interactions). Multi-agent: agent-scoped tabs; cross-agent reject with TAB_NOT_OWNED; cap configurable (default 8, 1-64). Pass tab_id only when this agent owns multiple tabs; auto-resolves otherwise. RETURNS change_report: when this tool runs, the response includes a change_report field with a compact diff of what the action mutated (URL, dialogs_opened, nodes_added, nodes_removed, attrs_changed, inputs_changed, focus_shift). Use this to learn the consequence without calling read_page next. If the report exceeds the size cap, change_report.truncated:true and change_report_hint are set; call read_page for the full state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate in viewport CSS pixels
yYesY coordinate in viewport CSS pixels
clientYesAllowlisted client label. Validated against the shared v0.9.36 server/extension allowlist (see mcp/src/tools/visual-session.ts -- MCP_VISUAL_CLIENT_LABELS). Required.
holdMsNoDuration to hold the mouse button in milliseconds (default 5000 = 5 seconds)
tab_idNoOptional. Tab id this action targets. Omit when the calling agent owns exactly one tab; pass to disambiguate when the agent owns multiple. Single-tab agents and legacy popup/sidepanel/autopilot do not need to pass this.
is_finalNoWhen true, the visual session clears immediately after this tool resolves. Optional (default false).
visual_reasonYesShort human-readable reason shown in the overlay (for example, "Logging in to GitHub"). Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so well: it discloses the CDP trusted-event mechanism and exact dispatch order, multi-agent tab scoping with TAB_NOT_OWNED rejection, the configurable agent cap (default 8, range 1-64), and the change_report return including the truncated/hint fallback. This is far beyond what bare structured fields provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action and organizes the rest into labeled segments (When to use, Related, Multi-agent, RETURNS). It is dense and slightly long, but each sentence maps to a distinct decision (invocation, alternative selection, ownership, return handling), so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description compensates fully: it explains the mechanic, the coordination model, error behavior, and the change_report contents plus the truncation escape hatch (call read_page). Nothing an agent needs to invoke or interpret this tool is missing.

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 100%, so the baseline is 3, but the description adds genuine context: it reinforces that coordinates are CSS pixels relative to the viewport and clarifies when tab_id should be passed versus auto-resolved. Required fields (visual_reason, client) are not elaborated, keeping it above baseline but not exhaustive.

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?

States a specific verb+resource+mechanism: 'Click and hold at specific viewport coordinates for a specified duration using CDP trusted events.' It then names the exact sequence (mousePressed, wait, mouseReleased) and explicitly distinguishes itself from siblings click_at and drag. An agent can pick it out of the ~70-tool list without opening a schema.

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?

Provides an explicit 'When to use' clause (record buttons, long-press menus, sustained press UIs) plus a 'Related' line contrasting click_at ('without hold') and drag ('click, move, and release'). It also gives the tab_id selection rule (pass only when owning multiple tabs) and the cross-agent rejection behavior, so both invocation and routing conditions are covered.

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