Skip to main content
Glama

click

Activate a page element by CSS selector or ref to submit forms, open dialogs, or navigate; returns page changes and new interactive refs.

Instructions

Click an element by CSS selector or by a ref (n1, n2…) from get_interactives or navigate. A real pointer sequence: it can submit, open a dialog or navigate — use wait_after. Not idempotent; a native confirm() blocks the bridge: handle_dialogs first. Returns page_changed (url, title and DOM deltas: nodes, text, open, expanded, checked, dialogs, focus): the effect, without a screenshot; when the click opens or reveals something, the refs of the visible interactives follow, no get_interactives needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoFrom get_interactives, e.g. "n3"
countNo2 emits dblclick after the two clicks, which is what selects a word or opens an editor
forceNoClick even if occluded
buttonNoright opens the page context menu instead of activating the elementleft
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
trustedNoReal browser input (isTrusted) via chrome.debugger, main frame only: for widgets that ignore synthetic clicks
frame_idNoTarget iframe id from get_frames; omitted = main frame
selectorNoCSS selector; ">>>" pierces shadow DOM. Ignored when ref is given
wait_afterNoSettle before returning: navigation waits for a page load, networkidle for quiet trafficnone

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.28.0
    • addedInput schema / properties / trusted
      Added value: +{
      +  "default": false,
      +  "description": "Real browser input (isTrusted) via chrome.debugger, main frame only: for widgets that ignore synthetic clicks",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv1.11.0
    • addedInput schema / properties / button
      Added value: +{
      +  "default": "left",
      +  "description": "right opens the page context menu instead of activating the element",
      +  "enum": [
      +    "left",
      +    "right"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / count
      Added value: +{
      +  "default": 1,
      +  "description": "2 emits dblclick after the two clicks, which is what selects a word or opens an editor",
      +  "type": "number"
      +}
  3. Changed4 schema fields changedv1.10.0
    • addedInput schema / properties / frame_id / description
      Added value: +"Target iframe id from get_frames; omitted = main frame"
    • addedInput schema / properties / selector / description
      Added value: +"CSS selector; \">>>\" pierces shadow DOM. Ignored when ref is given"
    • addedInput schema / properties / tab_id / description
      Added value: +"Target tab; omitted = last tab navigated in this session, else the active one"
    • addedInput schema / properties / wait_after / description
      Added value: +"Settle before returning: navigation waits for a page load, networkidle for quiet traffic"
  4. First observedv1.8.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and idempotentHint=false, so 'Not idempotent' is largely redundant, but the description adds genuinely non-schema behavior: a native confirm() blocks the bridge and requires handle_dialogs first, and the real pointer sequence can submit/open/navigate. It also describes the return payload (page_changed with DOM deltas) with no output schema present, which is real added value.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and its addressing modes, then behavior, then return shape — no filler sentences. It is dense and slightly long for a single tool, but nearly every clause carries actionable information an agent needs.

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?

With 9 parameters, no output schema, and only annotations for safety, the description compensates for the missing return documentation by describing page_changed's contents (url, title, DOM deltas, dialogs, focus) and the follow-on refs. An agent has everything needed to call and interpret this correctly.

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 description coverage is 100%, so the baseline is 3, but the description adds cross-cutting semantics the schema does not: refs come from get_interactives/navigate, and wait_after is framed as a settle-before-return control. It does not re-derive per-parameter meanings like count or trusted, which the schema already covers well.

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 the two addressing modes (CSS selector or ref from get_interactives/navigate), immediately distinguishing it from sibling tools like hover and drag_and_drop. An agent knows exactly what this does 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 Guidelines5/5

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

Explicitly routes to alternatives ('ref from get_interactives or navigate') and states preconditions ('a native confirm() blocks the bridge: handle_dialogs first') plus the follow-up knob ('use wait_after'). It even tells the agent when it does NOT need a sibling ('when the click opens or reveals something, the refs ... follow, no get_interactives needed').

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