Skip to main content
Glama

hover_action

Hover over a web element, optionally click a secondary element, or drag and drop one element onto another. Use for hover-triggered menus and drag-and-drop operations by specifying selectors and action type.

Instructions

Hover over an element, optionally click another, or drag-and-drop.

Use this tool for hover interactions, hover-triggered menus, and drag-and-drop operations.

Args: selector: The primary element selector. For action="hover", this is the element to hover over. For action="hover_and_click", this is the element to hover over before clicking 'secondary_selector'. For action="drag_and_drop", this is the draggable source element.

secondary_selector:
    The secondary element selector.
    Required for action="hover_and_click", where it identifies
    the element to click after hovering 'selector'.
    Required for action="drag_and_drop", where it identifies the
    destination/drop target.
    Not used for action="hover".

action:
    - "hover": Hover over 'selector' only.
    - "hover_and_click": Hover over 'selector', then click
      'secondary_selector' after a short moment has passed.
    - "drag_and_drop": Drag 'selector' and drop it onto
      'secondary_selector'.

timeout: Maximum seconds to wait for 'selector'.
    For drag_and_drop, the same timeout applies to secondary_selector.
    For hover_and_click, SeleniumBase uses its own short wait for
    secondary_selector; this parameter does not extend that secondary
    wait.

Returns: A confirmation message describing the performed operation's result.

Error behavior: If a required element cannot be found or interacted with within the applicable wait period, or if an error occurs during the action, the resulting exception message is returned through @handle_sb_errors. Failing actions such as failed hover_and_click will raise exceptions.

When not to use: - Do not use this tool to click if you don't need to hover an element before clicking another; use 'click' instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNohover
timeoutNo
selectorYes
secondary_selectorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It precisely explains the timing semantics for hover_and_click (including the separate short wait for secondary_selector), how timeout applies differently across actions, the two-step nature of drag_and_drop, and error behavior (exceptions propagated via @handle_sb_errors). This is thorough and preempts common failure modes.

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?

The description is structured with clear sections (Args, Returns, Error behavior, When not to use) and front-loads the core purpose. Each sentence adds value—no filler or repetition. Despite its length, every part is essential to correct usage, making it appropriately concise for the tool's complexity.

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?

Given the tool's complexity (three actions with distinct selector roles), the description covers everything an agent needs: parameter meanings, action-specific behaviors, timeout semantics, error handling, and return format. It also explicitly calls out when not to use the tool. There is no missing information that would cause mis-invocation.

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

Parameters5/5

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

Schema coverage is 0%, so the description must fully compensate. It does so by explaining each parameter's role per action: selector's three context-dependent meanings, secondary_selector's conditions and exclusions, the action enum with descriptions, and timeout's per-action nuances. This exceeds what the schema provides and leaves no ambiguity.

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 opens with a clear statement of the tool's function: 'Hover over an element, optionally click another, or drag-and-drop.' It explicitly lists the three action variants and distinguishes itself from siblings like click_element and focus_element by focusing on hover interactions. The purpose is unambiguous and differentiates from alternatives.

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?

The description provides explicit usage guidance for each action, including when to use hover_and_click and drag_and_drop. It also contains a 'When not to use' section that directs agents to use 'click' when no hover is needed, naming the alternative tool directly. This leaves no ambiguity about when to select this tool.

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