Skip to main content
Glama

click_ui

Destructive

Clicks a UI control by accessible name or mark using the accessibility tree, eliminating screenshots and pixel estimation. Works on focused or background windows.

Instructions

Click a control by its accessible NAME, or by a mark number from the last marks capture, in ONE call: the control comes from the accessibility tree, so no screenshot and no pixel estimation is spent. On the window the human is in, the window is focused and the click goes through the real pointer (visible cursor, same panic-kill guarantees). On any other window it runs in the background: the control's accessibility action presses it (a text field gets the app's own focus), the human's cursor and focus stay put, and the result reads the control back; a control with no action is refused there. When no control matches, a name also finds an element in another role that has an action (a web app's list row); if its action only focuses it, the result says so and whether the app reports it focused, which does not show what a key sent next will do: check with ui. background true or false forces one way (false takes over the human's screen). Pass exactly one of name (matched against window's controls, exact accessible name preferred, substring otherwise) or mark. An ambiguous name returns the candidates instead of guessing: disambiguate with index (0-based into that list) or a more specific name. Falls back with a note when the app exposes no tree (use screenshot + zoom + pointer then). then ('desktop'|'screenshot'|'ui'|'none') appends the result; 'ui' shows the click's effect on the controls in the same call. allow_auth=true overrides the refusal to click a system authentication dialog.

Input Schema

NameRequiredDescriptionDefault
markNo
nameNo
thenNonone
indexNo
buttonNoleft
doubleNo
windowNo
allow_authNo
backgroundNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.13.0
    • addedInput schema / properties / background
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Background"
      +}
  2. Addedv0.11.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=true; the description goes well beyond them by disclosing focus/cursor side effects per window, panic-kill guarantees, the refusal of actionless controls in the background, the ambiguity-returns-candidates behavior, and the `allow_auth` override for system dialogs. No contradiction with the destructive/not-readOnly annotations.

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?

Front-loads the core action ('Click a control by its accessible NAME... in ONE call') and packs substantial content with little filler. However, several clauses are dense and hard to parse in one pass (e.g. the sentence about an action that 'only focuses it'), and word count is high.

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 9-parameter, 0%-schema-coverage tool with an output schema (so return shape needn't be explained), the description covers routing, fallbacks, side effects, and the auth override thoroughly. The main gaps are the unmentioned `button` and `double` click modifiers.

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 0%, so the description carries the load and does define `name` matching semantics (exact preferred, substring otherwise), the exclusivity of `name`/`mark`, `index`, `then` values, `background`, and `allow_auth`. It omits `button`, `double`, and the scoping role of `window`, which are only inferable from their bare titles.

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?

States a specific verb (click) and the two exact addressing modes (accessible name or `mark`), plus the mechanism (accessibility tree, no screenshot/pixel estimation). This contrast with `screenshot`/`zoom`/`pointer` makes the tool distinguishable from its siblings at a glance.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing rules: exactly one of `name` or `mark`, `background` true/false to force foreground vs background, `index` to disambiguate an ambiguous name, and a stated fallback ('use screenshot + zoom + pointer then') when no tree is exposed. These are named when-to-use conditions, not inferences.

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