Skip to main content
Glama
computer
by zznabil

Click element

element_click
Destructive

Clicks UI elements by accessibility reference without a screenshot, supporting menu selection, double/right/middle clicks, modifier keys, and optional window takeover for reliable input.

Instructions

Click an element by ref (no screenshot needed). On Windows, Chromium content such as WebView2 needs takeover and a pointer point that hits the element. Gecko supports background clicks at a point verified against the element. Other covered controls can use an accessibility press for a plain left click.

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": {
      "ref": "<ref>"
    },
    "name": "element_click"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesElement ref from ax_tree/ax_find, e.g. "e12".
menuNoMenu item path to choose in the menu this click opens, e.g. ["Add to", "Fonts"].
countNoClick count, e.g. 2 for a double click.
buttonNo"left" (default), "right" or "middle".
takeoverNoOmit to follow the plugin setting ("prefer" uses real input first, "fallback" tries background input first, "refuse" disables takeover). Use true for reliable input in Chromium (including Brave), Electron, and terminal hosts when takeover is allowed. Takeover brings the window forward and can interrupt the user. For window targets, use false to request background-only input; desktop and display targets send real input.
modifiersNoModifier keys held during the click, e.g. ["shift"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • changedInput schema / properties / takeover / description
      Previous value: -"Omit (default): background first; the server decides any takeover. true: activate the window and post real input now. false: background only, never take over."New value: +"Omit to follow the plugin setting (\"prefer\" uses real input first, \"fallback\" tries background input first, \"refuse\" disables takeover). Use true for reliable input in Chromium (including Brave), Electron, and terminal hosts when takeover is allowed. Takeover brings the window forward and can interrupt the user. For window targets, use false to request background-only input; desktop and display targets send real input."
  2. First observedv0.2.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already flag this as non-read-only, destructive and open-world, but the description adds platform-specific mechanics the annotations cannot convey: Chromium content requires takeover and a hit-verified pointer point, Gecko supports background clicks, and covered accessibility controls can use a plain press. That is genuine operational context beyond the structured fields, though the side effects of takeover (window raising, user interruption) are left to 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?

Three tightly packed sentences, front-loaded with the core action and its addressing method, with no filler. The platform clauses are dense and jargon-heavy ('takeover', 'Gecko', 'verified against the element') but each carries actionable meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter action tool with no output schema, the description covers the main complexity risk (cross-platform click mechanics) but omits what a successful versus failed click looks like and what happens when the ref is stale. The safety profile is carried by annotations and parameter meaning by the schema, so what remains missing is moderate rather than severe.

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?

All six parameters are fully documented in the schema, including takeover semantics, button, count, modifiers and menu path, so the schema already does the heavy lifting. The description reinforces only the 'ref' addressing concept and adds nothing about menu, count, modifiers or button behavior beyond what the schema states.

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') and pins down the addressing mechanism ('by ref'), which separates it from coordinate-based siblings like click or move_mouse. It does not, however, distinguish itself explicitly from element_press or element_focus, which an agent must infer from names alone.

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?

The description explains which input mechanism applies per platform (Chromium/WebView2 needs takeover, Gecko supports background point clicks, other controls can use an accessibility press), which is useful routing information. It stops short of saying when to choose this tool over element_press or click, leaving the agent to infer the boundary from sibling names.

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