Skip to main content
Glama

click_element

Clicks a page element in a live session and reports whether the URL, DOM, or network actually changed, with fallback strategies for overlays and payment pages that ignore synthetic clicks.

Instructions

Click an element in a session page. Returns the new URL/title plus an HONEST change report: changed (bool), change (url/dom/network), click_method (pointer | pointer_force | js_dispatch), attempts. If nothing changed the result carries a hint. If a portal overlay (Radix/shadcn) or an unstable element blocks the pointer, the default strategy falls back to a synthetic JS click (flagged click_method='js_dispatch') — hosted payment pages ignore synthetic clicks (isTrusted), so use force=true (trusted pointer click at coordinates) or strategy='auto' (pointer → force → js_dispatch, stopping at the first attempt that changes the page; never re-clicks after a change).

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>",
      "selector": "<selector>"
    },
    "name": "click_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoTrusted pointer click at the element's coordinates, skipping actionability checks (default: false). Use for controls that ignore synthetic clicks (Stripe/hosted checkouts) or animating elements.
observeNoWhat to return about the resulting page. 'screenshot' (default): full-page image. 'none': structured result only, no image — cheapest, use through setup steps of a flow. 'map': semantic page map (get_page_map — token-light, best for 'what can I do next?'). 'checks': run_checks_on_session output (a11y/seo/perf/etc.).screenshot
selectorYesCSS selector of element to click
strategyNosingle (default): one attempt, honest change report. auto: escalate pointer → pointer_force → js_dispatch until the page changes.
session_idYesSession ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.12.0
    • changedInput schema / properties / force / description
      Previous value: -"Bypass actionability checks (default: false). Use when overlays intercept clicks."New value: +"Trusted pointer click at the element's coordinates, skipping actionability checks (default: false). Use for controls that ignore synthetic clicks (Stripe/hosted checkouts) or animating elements."
    • addedInput schema / properties / strategy
      Added value: +{
      +  "description": "single (default): one attempt, honest change report. auto: escalate pointer → pointer_force → js_dispatch until the page changes.",
      +  "enum": [
      +    "single",
      +    "auto"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changedv0.10.2
    • addedInput schema / properties / observe
      Added value: +{
      +  "default": "screenshot",
      +  "description": "What to return about the resulting page. 'screenshot' (default): full-page image. 'none': structured result only, no image — cheapest, use through setup steps of a flow. 'map': semantic page map (get_page_map — token-light, best for 'what can I do next?'). 'checks': run_checks_on_session output (a11y/seo/perf/etc.).",
      +  "enum": [
      +    "screenshot",
      +    "none",
      +    "map",
      +    "checks"
      +  ],
      +  "type": "string"
      +}
  3. First observedv0.1.0

TDQS

A4.2/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 burden and does so well: it names the honest change report, the fallback chain, the isTrusted caveat on hosted checkouts, and the rule that auto never re-clicks after a change. This is behavioral context an agent could not infer from 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.

Conciseness4/5

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

Purpose and return shape are front-loaded, and the fallback warning is placed where it matters. The single dense paragraph repeats some of what the schema already documents for force and strategy, which costs it a point.

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?

There is no output schema, and the description fills that gap by naming changed, change, click_method, attempts, and the hint on no-change. It omits waiting/timeout behavior and how selector matching resolves, which matters for a click tool on dynamic pages.

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 coverage is 100%, so baseline is 3; the description earns above baseline by explaining the interaction between force and strategy='auto' (fixed order, first-change stopping) rather than just restating enum values. It still leaves observe's modes to the schema.

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?

The description opens with a specific verb+resource ("Click an element in a session page") and immediately states what the call returns. It does not explicitly distinguish itself from near-neighbors like hover_element or find_element, leaving that differentiation to the agent.

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?

It gives concrete selection advice: use force=true for hosted payment pages that ignore synthetic clicks, or strategy='auto' to escalate pointer → force → js_dispatch. It covers when to escalate but never states when not to use this tool (e.g., versus hover_element or find_element first).

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