ai_screen_elements
Detect every interactive element on screen with precise center coordinates and an annotated screenshot, covering native apps and web pages to enable accurate UI clicking.
Instructions
🎯 PREFERRED — Use this FIRST when you need to click or interact with UI elements. Auto-detects ALL interactive elements (buttons, fields, links, etc.) with precise center coordinates. Uses accessibility tree for native apps, AND automatically scans web page elements via Chrome DevTools Protocol when a browser is frontmost. Returns: 1) Annotated screenshot with numbered markers on every element, 2) Element list with [number] role "title" center=(x,y). Web elements are prefixed with "web:" (e.g. web:input, web:button, web:link). These coordinates are MORE ACCURATE than manually reading positions from a plain screenshot. Always prefer this over screenshot+manual coordinate guessing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | Process ID of app to analyze (omit for frontmost app) | |
| maxWidth | No | Max screenshot width (default: 1440) |