Skip to main content
Glama

page.click

Clicks an element after scrolling it into view and reports observed DOM changes to confirm the app handled the interaction.

Instructions

Click an element, scrolling it into view first. By default watches for a DOM reaction and reports observed_change, so "the input was dispatched" is not mistaken for "the app handled it".

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": "page.click"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoWith y and no locator: click this viewport point in CSS px (the `at.css` units every click reports). For controls no locator can reach.
yNoWith x: viewport point in CSS px.
nthNoZero-based index when the locator matches several elements.
refNoSnapshot ref (eNN) from page.snapshot.
textNoVisible text of the element.
xpathNoXPath expression.
buttonNo
verifyNoWatch for DOM mutations after the click. Default true.
frame_idNoFrame to search within; see page.list_frames.
selectorNoCSS selector; pierces shadow DOM.
modifiersNoe.g. ["Control", "Shift"].
target_idNoTarget handle (tgt_*). Omit for the active page.
verify_msNoHow long to watch. Default 300.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
click_countNo
backend_node_idNoCDP backendNodeId, e.g. from inspector.pick.
retry_if_unchangedNoIf nothing changed, retry through the element own .click(), which reaches framework handlers synthetic input can miss.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With readOnlyHint=false and openWorldHint=true already declared, the description still adds real value: it discloses the scroll-into-view side effect and the default DOM-reaction watching that yields observed_change, warning that input dispatch is not proof of app handling. That distinction is important and is not captured by annotations. It does not cover failure modes such as what happens on timeout or with non-actionable elements.

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?

Two sentences, zero filler, and the primary action is front-loaded ahead of the behavioral caveat. The second sentence earns its place by explaining why the default verification exists.

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 17-parameter, zero-required mutation tool with no output schema, the description covers the single most consequential semantic (that observed_change is reported and should be checked). The main remaining gap is locator precedence among the many targeting parameters, which neither description nor schema resolves.

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 88%, so nearly every one of the 17 parameters is already documented in the schema, and the description adds no locator-strategy precedence (ref vs selector vs text vs x/y) that an agent must resolve among the mutually exclusive targeting options. It reinforces the verify default but that is already stated in the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Click an element') plus a non-obvious behavior (scrolling into view first). It is clearly distinguishable from siblings like page.hover, page.press and page.type by the verb alone, though it never explicitly names those alternatives.

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?

Usage is implied rather than stated — the tool clicks, so an agent infers when to reach for it. There is no explicit when-not guidance, e.g. that page.press should be used for keyboard-driven activation or page.hover for pointer-only interactions, so routing between the many interaction siblings is left to inference.

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

Deploy Server

Other Tools