Skip to main content
Glama

Click an element

browser_click
Destructive

Click a page element by snapshot ref or CSS selector in an open browser session, then return the resulting page state for verifying navigation or UI changes.

Instructions

Click an element, named by a ref from the latest browser_snapshot or by a CSS selector -- exactly one of the two. Returns where the page is afterwards.

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

Input Schema

NameRequiredDescriptionDefault
refNoA ref from the latest `browser_snapshot`: for `[ref=e14]`, 'e14'. This or `selector`.
timeoutNoSeconds; unset, 30.
selectorNoA CSS or Playwright selector. This or `ref`.
session_idYesThe session_id `browser_open` returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.14.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, idempotentHint=false and readOnlyHint=false, so the safety profile is covered structurally. The description adds the return semantics ('Returns where the page is afterwards'), which is genuinely useful, but it does not warn that a click may navigate, submit forms, or trigger irreversible side effects — a notable omission for a tool flagged destructive and open-world.

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?

One sentence, front-loaded with the action and the addressing constraint, then the outcome. No filler and nothing repeated from the title.

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 four-parameter, no-output-schema tool with full annotation coverage, the description covers what it acts on, how the target is specified, and what it returns. The remaining gap is side-effect/navigation disclosure, which is partly absorbed by the destructiveHint annotation.

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 ref, selector, timeout and session_id are already fully documented, and the description's 'exactly one of the two' merely restates the schema's own 'This or `selector`' wording. Baseline 3 applies since the description adds no syntax, format, or default detail 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 verb+resource ('Click an element') and immediately names the two supported addressing modes (`ref` from the latest `browser_snapshot`, or a CSS `selector`). Combined with the 'exactly one of the two' rule, an agent can distinguish it from browser_type/browser_press 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 Guidelines3/5

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

The description gives a real selection rule between the two addressing parameters ('exactly one of the two') and points at `browser_snapshot` as the source of refs, which implies a snapshot-then-click workflow. It says nothing about when to prefer this over siblings like browser_press or browser_type, or about preconditions such as waiting for the target to exist.

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