All tools

ui_get_element

Screen, windows & UI · macOS · Windows

Effect: read (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

Re-resolves a previously returned element_ref (its bounds/state may have changed). Returns role, label, bounds, focused, value, and `enabled` ONLY when the app publishes AXEnabled — that attribute is optional, so many perfectly usable controls omit it (TextEdit's text area does). When it is missing you get `enabled_unknown: true` instead; that is 'unknown', NOT disabled, and ui_click will click it. stale_element if the handle is unknown or the element no longer exists.

Required inputs

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": {
    "element_ref": {
      "type": "string"
    }
  },
  "required": [
    "element_ref"
  ],
  "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.

{
  "element_ref": "demo-button-001"
}

Windows

Purpose

Re-resolves a previously returned element_ref (its bounds/state may have changed). Returns role, label, bounds, enabled, focused, value. stale_element if the handle is unknown or the element no longer exists.

Required inputs

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": {
    "element_ref": {
      "type": "string"
    }
  },
  "required": [
    "element_ref"
  ],
  "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.

{
  "element_ref": "demo-button-001"
}