Skip to main content
Glama

click

Select and activate page elements by reference, CSS selector, visible text, or precise viewport coordinates. Uses real browser mouse events and reports opened tabs or DOM changes for reliable automation.

Instructions

Click an element by ref, CSS selector, visible text, or viewport x/y (canvas, pixel-precise targets). Dispatches real CDP mouse events. A click that opens a new tab is reported in the response. The DOM diff (NEW/REMOVED/CHANGED) arrives with the next response, or in this one with wait_for_diff: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoViewport X in px; with y, not ref/selector
yNoViewport Y in px; use with x
refNoElement ref (preferred)
textNoVisible text (a11y name); no view_page needed, prefers interactive
selectorNoCSS selector (fallback)
wait_for_diffNoWait for the DOM diff before returning (default false, slower)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed8 schema fields changedv2.10.5
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / ref / description
      Previous value: -"A11y-Tree element ref (e.g. 'e5') — preferred over selector"New value: +"Element ref (preferred)"
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector (e.g. '#submit-btn') — fallback when ref is not available"New value: +"CSS selector (fallback)"
    • changedInput schema / properties / text / description
      Previous value: -"Visible text to match (e.g. 'Submit'). Finds element by name in the A11y tree — no prior view_page needed. Prefers interactive elements (buttons, links)."New value: +"Visible text (a11y name); no view_page needed, prefers interactive"
    • changedInput schema / properties / wait_for_diff / description
      Previous value: -"When true, wait for the DOM diff synchronously before returning (slower but diff is in this response). Default: false — diff piggybacks on the next tool response."New value: +"Wait for the DOM diff before returning (default false, slower)"
    • changedInput schema / properties / x / description
      Previous value: -"X coordinate (viewport pixels) — for canvas or pixel-precise clicks. Use with y instead of ref/selector."New value: +"Viewport X in px; with y, not ref/selector"
    • changedInput schema / properties / y / description
      Previous value: -"Y coordinate (viewport pixels) — for canvas or pixel-precise clicks. Use with x instead of ref/selector."New value: +"Viewport Y in px; use with x"
  2. First observedv2.7.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full transparency burden. It discloses that real CDP mouse events are dispatched, that a click opening a new tab is reported in the response, and that DOM diff results arrive with the next response unless wait_for_diff is set. These are significant behavioral details beyond the schema.

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 sentences with no filler. The first sentence front-loads the tool's purpose and target options; the second and third cover event dispatch and async behavior. Every sentence adds value.

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?

The description covers targeting modes, event behavior, new-tab reporting, and diff timing, which is substantial given the absence of annotations and output schema. It does not explicitly define precedence when multiple target parameters are supplied, though the schema's 'preferred' and 'fallback' labels mitigate that gap.

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?

All six parameters are fully described in the schema, so the baseline is 3. The description adds useful cross-parameter semantics: it clarifies the relationship between x/y, explains that text targeting works without view_page, and highlights the wait_for_diff latency trade-off.

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 names a specific verb (Click) and enumerates the supported target strategies: ref, CSS selector, visible text, and viewport x/y for canvas/pixel-precise targets. This clearly distinguishes the tool from siblings like type, press_key, and scroll.

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?

The description gives strong within-tool usage guidance: ref is preferred, selector is a fallback, text needs no view_page, and x/y is for canvas/pixel-precise targets. It does not explicitly contrast with sibling tools like type or fill_form, but the targeting guidance is clear enough to select the correct mode.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Silbercue/public-browser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server