Skip to main content
Glama

glass_click_element

Click one element by ID or target, using native or pointer mode to handle occlusion and focus, with timeout and stability reporting.

Instructions

Click exactly one id or target. A target resolves fresh and uniquely within timeout_ms (10 seconds by default). Mode auto prefers native then pointer fallback; native requires native action; pointer waits for stability and reports actionability, including unproven checks. ID targets remain immediate. Native actions may bypass occlusion or focus text editors. method/native_fallback/actuated_id disclose the path; popover actions restore the prior window. Glass never retries after possible dispatch. For 2+ known steps, use glass_do.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoLatest snapshot ID, exclusive with target; re-read after UI changes. Native action may focus text editors; fallback clicks the center. Popover actions restore the prior window.
modeNo
returnNonone (default): no observation; settle: text-only visual stability; snapshot: settle and refresh/fold the accessibility tree.
targetNo
max_nodesNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv1.8.0
    • addedInput schema / $defs
      Added value: +{
      +  "ActionModeArg": {
      +    "enum": [
      +      "auto",
      +      "native",
      +      "pointer"
      +    ],
      +    "type": "string"
      +  },
      +  "ActionScopeArgs": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "query": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "role": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "states": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": [
      +          "array",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "ActionTargetArgs": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "query": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "role": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "states": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": [
      +          "array",
      +          "null"
      +        ]
      +      },
      +      "within": {
      +        "anyOf": [
      +          {
      +            "$ref": "#/$defs/ActionScopeArgs"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  }
      +}
    • changedInput schema / properties / id / description
      Previous value: -"Element `#id` from the latest `glass_a11y_snapshot`.\nRe-snapshot after UI changes.\nPopover-owned targets route to their window and restore the prior active window.\nThe role-appropriate native accessibility operation handles occluded or off-screen targets\nand separate labels through their enclosing control.\nUnavailable native operations fall back to a pointer click at the target center.\nText editors may receive focus without activation.\n`method:\"native-action\"` labels any native path.\n`native_fallback` explains pointer fallback.\n`actuated_id` identifies a substituted enclosing control."New value: +"Latest snapshot ID, exclusive with target; re-read after UI changes. Native action may focus text editors; fallback clicks the center. Popover actions restore the prior window."
    • changedInput schema / properties / id / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
    • addedInput schema / properties / max_nodes
      Added value: +{
      +  "format": "uint32",
      +  "minimum": 0,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / mode
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ActionModeArg"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • changedInput schema / properties / return / description
      Previous value: -"Terminal observation: \"snapshot\" settles and refreshes/folds a11y, \"settle\" waits for\nvisual stability and returns text-only metadata, and \"none\" skips observation (default)."New value: +"none (default): no observation; settle: text-only visual stability; snapshot: settle and refresh/fold the accessibility tree."
    • addedInput schema / properties / target
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ActionTargetArgs"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / timeout_ms
      Added value: +{
      +  "format": "uint64",
      +  "maximum": 120000,
      +  "minimum": 0,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • removedInput schema / required
      Removed value: -[
      -  "id"
      -]
  2. Changed2 schema fields changedv1.5.1
    • changedInput schema / properties / id / description
      Previous value: -"The element `#id` from `glass_a11y_snapshot`. Valid only within the latest\nsnapshot — re-snapshot if the UI changed. If the element actually renders in a\npopover owned by a different window than the active one (e.g. an open\ndropdown's option row), the click is automatically routed into that popover\nwindow and the previously-active window is restored afterward — no extra step\nneeded.\n\nClicks via the platform's native accessibility action when the element exposes\none (works even when the element is occluded or scrolled off-screen), falling\nback to a synthetic pointer click at the element's center; the result's\n`method` field says which path ran, and `native_fallback` says why when the\npointer path was used. Where a control's label is a separate element from the\ncontrol itself, the native action fires on the enclosing control and the\nresult carries `actuated_id` — the element actually clicked."New value: +"Element `#id` from the latest `glass_a11y_snapshot`.\nRe-snapshot after UI changes.\nPopover-owned targets route to their window and restore the prior active window.\nThe role-appropriate native accessibility operation handles occluded or off-screen targets\nand separate labels through their enclosing control.\nUnavailable native operations fall back to a pointer click at the target center.\nText editors may receive focus without activation.\n`method:\"native-action\"` labels any native path.\n`native_fallback` explains pointer fallback.\n`actuated_id` identifies a substituted enclosing control."
    • changedInput schema / properties / return / description
      Previous value: -"Optional observe folded into the result: \"snapshot\" (wait for the UI to settle, then\nfold a fresh a11y tree, also refreshing the snapshot cache), \"settle\" (wait for the UI\nto stop changing, text-only), or \"none\" (default)."New value: +"Terminal observation: \"snapshot\" settles and refreshes/folds a11y, \"settle\" waits for\nvisual stability and returns text-only metadata, and \"none\" skips observation (default)."
  3. Changed2 schema fields changedv1.2.0
    • changedInput schema / properties / id / description
      Previous value: -"The element `#id` from `glass_a11y_snapshot`. Valid only within the latest\nsnapshot — re-snapshot if the UI changed. If the element actually renders in a\npopover owned by a different window than the active one (e.g. an open\ndropdown's option row), the click is automatically routed into that popover\nwindow and the previously-active window is restored afterward — no extra step\nneeded."New value: +"The element `#id` from `glass_a11y_snapshot`. Valid only within the latest\nsnapshot — re-snapshot if the UI changed. If the element actually renders in a\npopover owned by a different window than the active one (e.g. an open\ndropdown's option row), the click is automatically routed into that popover\nwindow and the previously-active window is restored afterward — no extra step\nneeded.\n\nClicks via the platform's native accessibility action when the element exposes\none (works even when the element is occluded or scrolled off-screen), falling\nback to a synthetic pointer click at the element's center; the result's\n`method` field says which path ran, and `native_fallback` says why when the\npointer path was used. Where a control's label is a separate element from the\ncontrol itself, the native action fires on the enclosing control and the\nresult carries `actuated_id` — the element actually clicked."
    • removedInput schema / title
      Removed value: -"ClickElementArgs"
  4. Addedv1.0.3

TDQS

A4.3/5.0
Behavior5/5

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

The annotations only set readOnlyHint=false, destructiveHint=false, leaving the description to carry the full behavioral burden. The description does this well: it discloses that native actions may bypass occlusion or focus text editors, that pointer waits for stability and reports actionability, that method/native_fallback/actuated_id disclose the path, that popover actions restore the prior window, and that Glass never retries after possible dispatch. These are rich behavioral traits beyond what annotations offer.

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 front-loaded with the core purpose and then provides a dense set of behavioral notes. Every sentence contributes new information without redundancy, though the density may require careful parsing. It is appropriately sized for a tool with complex behavior.

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 tool with 6 parameters, no output schema, and minimal annotations, the description covers many critical aspects: target resolution, timeout, modes, retry behavior, and fallback mechanics. It does not detail max_nodes or return behavior, but those are partially covered by schema descriptions. The description is complete enough for an agent to call the tool correctly in most scenarios.

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 only 33%, so the description must compensate. It explains timeout_ms (10 seconds default) and mode (auto/native/pointer semantics), which adds value. However, it does not explain max_nodes or the exact use of target/id beyond the exclusivity mention, leaving some parameters under-specified. The description adds meaningful but incomplete parameter context, warranting a score above baseline but not high.

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 opens with 'Click exactly one id or target,' which clearly states the verb (click), the resource (one element identified by id or target), and the constraint of exactly one. It also names a sibling alternative, glass_do, for multi-step actions, helping distinguish the tool's purpose.

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 explicit guidance for when to use this tool vs glass_do ('For 2+ known steps, use glass_do') and explains the mode selection logic (auto/native/pointer). It does not mention the simpler glass_click sibling, but the core usage context is clear enough for an agent to decide when to invoke this tool.

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