Skip to main content
Glama

browser_click

Click a page element using a snapshot ref or CSS selector, scrolling it into view and hit-testing the click point to confirm the click landed on the intended element.

Instructions

Click an element. Prefer ref from browser_snapshot — it is a fact about the node the browser reported, not a guess about the page's CSS. selector still works. Scrolls into view and hit-tests the click point first; the result reports hit (whether the point really was that element) and landedOn (what was actually there).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_click"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoRef from the latest browser_snapshot, e.g. e12
selectorNoCSS selector (use ref instead when you have one)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.5.0
    • addedInput schema / properties / ref
      Added value: +{
      +  "description": "Ref from the latest browser_snapshot, e.g. e12",
      +  "type": "string"
      +}
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector"New value: +"CSS selector (use ref instead when you have one)"
    • removedInput schema / required
      Removed value: -[
      -  "selector"
      -]
  2. First observedv2.0.4

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it delivers non-obvious behavior: the element is scrolled into view, the click point is hit-tested beforehand, and the response reports `hit` and `landedOn`. It does not state what happens on failure (missing element, stale ref, timeout) or whether it waits for navigation after the click.

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 tight sentences, front-loaded with the action, then parameter preference, then side effects and return fields. Every sentence carries distinct information and nothing is repeated from the schema verbatim.

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?

With no output schema, the description usefully names the two response fields (`hit`, `landedOn`), and it covers the pre-click side effects. Remaining gaps are failure modes and post-click navigation waiting, which matter for an automation click but are not addressed.

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 would be 3, but the description adds genuine meaning beyond the schema by explaining that a `ref` is a fact reported by the browser rather than a guess about the page's CSS — the rationale for preferring it. It does not explain ref staleness or selector matching semantics.

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?

Opens with a specific verb+resource ("Click an element") and immediately scopes it to the two targeting mechanisms, `ref` and `selector`. An agent can distinguish this from siblings like browser_fill, browser_hover, or browser_act without opening the schema.

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?

Gives explicit guidance on which parameter to prefer (`ref` from browser_snapshot) and why, and confirms `selector` remains valid, which is real routing guidance between two alternatives. It stops short of saying when not to use this tool at all — e.g. multi-step interactions versus browser_act, or typing versus browser_fill.

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