Skip to main content
Glama

click

Click a web element using a CSS selector or ref from get_interactives. Configure button, click count, and wait conditions to handle navigation and dialogs.

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.

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
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. 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"
      +}
  2. 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"
  3. First observedv1.8.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavioral details: real pointer actions can trigger navigation, dialogs, or form submission, and native confirm() dialogs can block the bridge. It explicitly states non-idempotence and directs users to handle dialogs, providing valuable context not present in the annotations.

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?

The description is concise, using three focused sentences that front-load the core purpose and then add necessary caveats. Every sentence contributes meaningful information—no fluff, redundancy, or excessive detail. The structure is efficient and easy to scan.

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 the tool's complexity (8 parameters, no output schema), the description covers purpose, selector/ref resolution, side effects, and interaction with wait_after and handle_dialogs. It does not describe return values, but for an action-oriented click tool this is a minor omission given the rich schema and behavioral notes.

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?

The input schema already provides full descriptions for all 8 parameters, so the baseline is high. The description adds useful semantic context by explaining the relationship between ref and selector (selector ignored when ref given) and that wait_after controls settling behavior. This goes slightly beyond schema descriptions without duplicating them.

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?

The description clearly states the tool's primary function: clicking an element by CSS selector or ref. It distinguishes usage from related tools like hover and press_key by specifying the click action and referencing get_interactives/navigate for obtaining refs. The purpose is immediately understandable.

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?

The description provides explicit guidance on when to use the tool and how to handle side effects: it notes that a real pointer sequence can submit, open dialogs, or navigate, and recommends wait_after. It also warns about non-idempotence and advises using handle_dialogs first for native confirm() blocks, making usage conditions clear.

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