Skip to main content
Glama

click

Waits for a web element to become visible and enabled, then clicks it, scrolling into view. Targets by selector or ref; use retry_click if clicks fail intermittently.

Instructions

Click an element: waits until it is visible and enabled, then clicks it (scrolling it into view). Target it by selector or by a ref from capture_page. If clicks fail intermittently because of overlays, animations, or re-rendering, use retry_click; for double-click, right-click, or hover, use interact. Fails with the reason if the element does not become clickable within timeoutMs.

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.
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 visible and enabled, in milliseconds (default 10000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.3.0
    • 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 visible and enabled, in milliseconds (default 10000)."
  2. Changed2 schema fields changedv0.2.0
    • addedInput schema / properties / ref
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "selector"
      -]
  3. First observedv0.1.2

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does well: it discloses that the element is scrolled into view, that it waits for visibility and enablement, and that failure returns the reason. It does not describe what a successful click returns, which is a minor remaining gap.

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, each front-loaded with actionable information: primary behavior first, then alternative routing, then failure mode. No filler or redundancy.

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?

Given no output schema and full input-schema coverage, the description covers the essential behavioral contract: waiting, scrolling, targeting, and failure reporting. It would be fully complete if it briefly stated the success return or side-effect expectation, but nothing critical for correct invocation is missing.

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%, so all three parameters already have detailed schema-level documentation (including ref staleness after navigation). The description adds only high-level targeting context and does not meaningfully extend parameter semantics beyond the schema.

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 action (click an element), the waiting behavior (visible and enabled), and the two targeting mechanisms (selector or ref). It also names sibling tools (retry_click, interact) for adjacent use cases, so an agent can distinguish it without opening other schemas.

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?

Explicitly says when to use this tool versus alternatives: use retry_click for intermittent failures from overlays/animations/re-rendering, and use interact for double-click, right-click, or hover. It also names the fallback behavior on timeout, giving complete routing guidance.

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