All tools

ui_click

Screen, windows & UI · macOS · Windows

Effect: execute (strongest supported action). Status: gated.

Gated means the tool requires an installed app, a connected account, permission, or runtime availability. Check those requirements on the listed platform before using it.

macOS

Purpose

Clicks an element (by element_ref, at its center) or a screen coordinate (by coords). button left|right, count 2 = double-click. Returns {clicked, at:{x,y}} — `clicked` means the click event was POSTED at those coordinates, NOT that the app acted on it: CGEvent carries no delivery confirmation, so a busy, modal or input-ignoring app reports exactly the same success. Confirm the effect with ui_wait_for_element or ui_read_tree rather than trusting `clicked`. element_disabled is returned ONLY when the app actually publishes AXEnabled=false; a control that does not publish AXEnabled at all is treated as unknown and clicked. Requires Accessibility permission.

Required inputs

No required inputs are declared in this platform's schema. Optional selectors and runtime requirements may still apply.

Permissions and confirmation

No explicit confirmation parameter is exposed in this snapshot. This does not grant permission to act: obtain user authorization before any real action.

Full input schema — macOS
{
  "properties": {
    "button": {
      "description": "Default left.",
      "enum": [
        "left",
        "right"
      ],
      "type": "string"
    },
    "by": {
      "description": "Default element if element_ref given, else coords.",
      "enum": [
        "element",
        "coords"
      ],
      "type": "string"
    },
    "coords": {
      "description": "{x,y} in global screen points.",
      "type": "object"
    },
    "count": {
      "description": "1 (default) or 2 for double-click.",
      "type": "integer"
    },
    "element_ref": {
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "coords": {
    "x": 100,
    "y": 100
  }
}

Windows

Purpose

Clicks an element (by element_ref, at its center) or a screen coordinate (by coords). button left|right, count 2 = double-click. Returns {clicked, at:{x,y}} — `clicked` means the click was POSTED at those coordinates, NOT that the app acted on it: SendInput carries no delivery confirmation, so a busy or modal app reports the same success. Confirm the effect with ui_wait_for_element or ui_read_tree rather than trusting `clicked`.

Required inputs

No required inputs are declared in this platform's schema. Optional selectors and runtime requirements may still apply.

Permissions and confirmation

No explicit confirmation parameter is exposed in this snapshot. This does not grant permission to act: obtain user authorization before any real action.

Full input schema — Windows
{
  "properties": {
    "button": {
      "description": "Default left.",
      "enum": [
        "left",
        "right"
      ],
      "type": "string"
    },
    "coords": {
      "description": "{x,y} in global screen pixels.",
      "type": "object"
    },
    "count": {
      "description": "1 (default) or 2 for double-click.",
      "type": "integer"
    },
    "element_ref": {
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}

Documentation example

Do not execute this example. These concrete inputs refer to a fictional demonstration dataset. Resolve real handles and obtain user authorization before any real call.

{
  "coords": {
    "x": 100,
    "y": 100
  }
}