Skip to main content
Glama

glass_click_element

Click a UI element by its snapshot id via native accessibility action, with pointer-click fallback for hidden elements. Handles popover windows automatically.

Instructions

Click an element by its #id from glass_a11y_snapshot (actuates via the platform's native accessibility action when the element exposes one — works even when it's occluded or scrolled off-screen — else falls back to a synthetic pointer click at the center of its bounds; the result's method field says which path ran, native_fallback says why when the pointer path was used, and actuated_id names the element actually clicked when a control's label is a separate element from the control itself). If the element actually renders in a popover owned by a different window than the active one (e.g. an open dropdown's option row), the click is automatically routed into that popover window and the previously-active window is restored afterward. Ids are only valid within the latest snapshot — re-run glass_a11y_snapshot if the UI changed. Optional return: "snapshot" settles the UI then folds a fresh a11y tree into the result (and refreshes the snapshot cache); "settle" waits for the UI to stop changing (text-only); omit or "none" for no observe (default).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe element `#id` from `glass_a11y_snapshot`. Valid only within the latest snapshot — re-snapshot if the UI changed. If the element actually renders in a popover owned by a different window than the active one (e.g. an open dropdown's option row), the click is automatically routed into that popover window and the previously-active window is restored afterward — no extra step needed. Clicks via the platform's native accessibility action when the element exposes one (works even when the element is occluded or scrolled off-screen), falling back to a synthetic pointer click at the element's center; the result's `method` field says which path ran, and `native_fallback` says why when the pointer path was used. Where a control's label is a separate element from the control itself, the native action fires on the enclosing control and the result carries `actuated_id` — the element actually clicked.
returnNoOptional observe folded into the result: "snapshot" (wait for the UI to settle, then fold a fresh a11y tree, also refreshing the snapshot cache), "settle" (wait for the UI to stop changing, text-only), or "none" (default).
Behavior5/5

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

With no annotations, the description carries the full burden. It thoroughly discloses the dual execution paths (native vs synthetic pointer), the result fields (`method`, `native_fallback`, `actuated_id`), handling of occluded/off-screen elements, popover window routing, and snapshot staleness. This is exemplary transparency.

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?

The description is lengthy and densely packed with parentheticals, but every detail serves a purpose (fallback behavior, popover routing, snapshot validity, return options). While it could be restructured into clearer sentences, the complexity justifies the length and the core action is front-loaded.

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

Completeness5/5

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

With no output schema, the description compensates by explaining the result fields (`method`, `native_fallback`, `actuated_id`) and the optional return behavior. It covers edge cases like occluded elements, popover ownership, and stale snapshots, making it fully complete for an agent to understand the tool's capabilities and consequences.

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?

The input schema already provides full descriptions for both `id` and `return` (100% coverage). The description repeats this information and adds result-field context, but that is output-oriented. Since the schema already documents parameters thoroughly, the description adds little new meaning beyond the schema, warranting the baseline score.

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 action (click), the target (an element identified by #id from glass_a11y_snapshot), and the specific method (native accessibility action with pointer fallback). This distinguishes it from sibling tools like glass_click, which likely operates on coordinates or other selectors.

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 provides clear context: the id is only valid within the latest snapshot, and the user should re-run glass_a11y_snapshot if the UI changed. It also explains popover routing and the optional return parameter. However, it does not explicitly state when to prefer this tool over alternatives like glass_click, so it lacks full exclusion guidance.

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

Install Server

Other Tools

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/fixed-width/glass'

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