Android find Text
android_find_textOCR the current Android screen to extract visible text when UI tree lacks labels, returning pixel bounding boxes for automated tapping or verification.
Instructions
OCR the CURRENT screen of a connected Android device or emulator with the plugin-compiled Vision helper (accurate recognition, zh-Hans + en-US, compiled with swiftc on first use into ~/Library/Caches/codex-android-mcp/bin/ocr; the device side is plain screencap, but recognition needs a macOS host). Use this when android_ui_tree returns no labels — Jetpack Compose without semantics, Flutter, a WebView, a game or video surface all dump as one unlabeled node — for text rendered as graphics (badge counts, prices baked into images), or to independently verify what is on screen. Captures a fresh screenshot, then returns {device, screen size in PIXELS, items:[{text, confidence, rect}]}. Rects are pixel boxes with the origin at the top-left, the SAME space android_ui_tree bounds use, so they can be tapped via android_tap_text or compared directly. Items are confidence-sorted and the list is capped at ~40 KB (truncated=true drops the lowest-confidence tail — narrow with query or raise min_confidence). Icon-only controls carry no OCR text: look for their content-desc in android_ui_tree, or use android_ui_rows for list items.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Optional case-insensitive substring filter on the recognized text (e.g. "支付" or "Wi-Fi"). Omit to return every item above min_confidence. | |
| serial | No | Target device serial from android_devices. Defaults to the currently streamed device, else the only connected one. | |
| min_confidence | No | Minimum recognition confidence 0..1 to include (default 0.3). Raise it to drop noise, lower it to catch faint text. |