Skip to main content
Glama

Click element by ref

browser_click

Clicks a page element by its reference, verifying it is visible and unobstructed first; handles one covered-target popup retry and reports stale refs so you can refresh.

Instructions

Click one element by its ref (from browser_observe / browser_find / browser_open), e.g. "e7". Free — no model call. The ref is re-validated as visible and unobstructed before clicking; a covered target gets one popup-dismissal retry, then fails naming the occluding element. Returns {ok, detail, page}; check ok. If it reports a stale reference the page changed — call browser_observe or browser_find again for fresh refs.

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": {
      "ref": "<ref>"
    },
    "name": "browser_click"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesElement ref from a recent observe/find/open, e.g. "e7" or "f2".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so: it discloses cost ("Free — no model call"), pre-click validation of visibility and obstruction, a single popup-dismissal retry, and the failure message naming the occluding element. It also states the return shape {ok, detail, page} and tells the agent to check `ok`, which is behavior an agent cannot get from any structured field here.

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?

Front-loads the action, then the ref provenance, then cost, then failure/retry semantics, then the recovery path. Every clause carries information; nothing restates the tool name or the schema.

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?

Although there is no output schema, the description supplies the return shape and the success signal (`ok`), plus the stale-ref recovery loop. For a one-parameter click tool with no annotations, nothing an agent needs in order to call it correctly and handle failure 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% and the single `ref` parameter is already documented in the schema, so baseline is 3. The description adds meaningful semantics beyond that: refs are time-sensitive (stale refs signal the page changed) and are re-validated before the click, so the agent knows a ref is a point-in-time handle rather than a durable selector.

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?

Names a specific verb and resource ("Click one element by its ref") and immediately identifies where the ref comes from (browser_observe / browser_find / browser_open), which is exactly the distinction that separates it from sibling tools like browser_type or browser_select.

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

Usage Guidelines4/5

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

Explains the prerequisite for use — a ref obtained from a recent observe/find/open — and gives explicit recovery guidance: on a stale reference, call browser_observe or browser_find again. It does not explicitly say when to prefer this over e.g. browser_press or browser_select, but the ref prerequisites give clear routing for the primary case.

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