Skip to main content
Glama

interact

Perform double-click, right-click, hover, or real mouse move-and-click on elements to open context menus, show tooltips, and trigger pointer-only UI. Use when a plain click is not enough.

Instructions

Mouse actions beyond a plain click: double_click, right_click (opens a context menu), hover (reveals menus and tooltips), or click performed as a real mouse move-and-click. Waits for the element to be visible (hover) or visible and enabled (clicks). Target it by selector or by a ref from capture_page. For an ordinary click, prefer click.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoElement ref from the latest capture_page result (e.g. 'e12'). Use instead of selector; refs go stale after navigation, so capture again if one is rejected.
actionYesdouble_click | right_click | hover | click. 'click' moves the mouse onto the element first, which helps with elements that only react to real pointer movement.
selectorNoHow to find the element, e.g. { by: 'id', value: 'user-name' } or { by: 'css', value: '#login-button' }. Provide either selector or ref.
timeoutMsNoHow long to wait for the element to become ready, in milliseconds (default 10000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.3.0
    • addedInput schema / properties / action / description
      Added value: +"double_click | right_click | hover | click. 'click' moves the mouse onto the element first, which helps with elements that only react to real pointer movement."
    • addedInput schema / properties / ref / description
      Added value: +"Element ref from the latest capture_page result (e.g. 'e12'). Use instead of selector; refs go stale after navigation, so capture again if one is rejected."
    • addedInput schema / properties / selector / description
      Added value: +"How to find the element, e.g. { by: 'id', value: 'user-name' } or { by: 'css', value: '#login-button' }. Provide either selector or ref."
    • addedInput schema / properties / selector / properties / by / description
      Added value: +"Locator strategy: css, xpath, id, name, class/className, tag/tagName, linkText, or partialLinkText."
    • addedInput schema / properties / selector / properties / value / description
      Added value: +"The locator for that strategy, e.g. '#login-button' for css, 'user-name' for id, or //button[@type=\"submit\"] for xpath."
    • addedInput schema / properties / timeoutMs / description
      Added value: +"How long to wait for the element to become ready, in milliseconds (default 10000)."
  2. Changed2 schema fields changedv0.2.0
    • addedInput schema / properties / ref
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "action",
      -  "selector"
      -]New value: +[
      +  "action"
      +]
  3. First observedv0.1.2

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 behavioral burden and does useful work: it discloses per-action readiness semantics (waits for visible on hover, visible-and-enabled on clicks) and the side effect that right_click opens a context menu. It does not cover failure behavior (what happens on timeout), whether the page can navigate as a result of a click, or what is returned, which are the remaining gaps for a state-mutating interaction tool.

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, front-loaded with the action list, followed by readiness semantics and then the sibling routing rule. No filler, and the most decision-relevant information (what actions exist and which tool to use instead) comes first.

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 4-parameter interaction tool with no annotations and no output schema, the description covers actions, targeting, and readiness adequately. It omits the post-action contract (return value, whether navigation may occur) and timeout behavior, which an agent would benefit from knowing before triggering a mutation.

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 description coverage is 100%, so the baseline is 3. The description adds real meaning beyond the schema by tying readiness/waiting behavior to the action value (hover vs clicks) and restating the selector-or-ref targeting choice. It stops short of adding timeout or locator-strategy nuance, so it is an incremental rather than a transformative gain.

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 names the specific resource (mouse actions on an element) and enumerates the exact operations: double_click, right_click, hover, and click-as-real-mouse-move. It explicitly separates itself from the sibling 'click' tool with 'For an ordinary click, prefer click,' so an agent can disambiguate without opening either 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?

It gives an explicit routing rule to the alternative tool ('For an ordinary click, prefer click') and describes the conditions that select each action (right_click opens a context menu, hover reveals menus/tooltips, click helps elements that react to real pointer movement). This is as close to when/when-not guidance as a multi-action tool can get.

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