Skip to main content
Glama
zifanersuotang

Codex Android MCP

Android find Text

android_find_text
Read-onlyIdempotent

OCR 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

TableJSON Schema
NameRequiredDescriptionDefault
queryNoOptional case-insensitive substring filter on the recognized text (e.g. "支付" or "Wi-Fi"). Omit to return every item above min_confidence.
serialNoTarget device serial from android_devices. Defaults to the currently streamed device, else the only connected one.
min_confidenceNoMinimum recognition confidence 0..1 to include (default 0.3). Raise it to drop noise, lower it to catch faint text.
Behavior5/5

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

Despite annotations already declaring readOnlyHint=true and idempotentHint=true, the description adds substantial behavioral detail beyond annotations: it states the tool captures a fresh screenshot, requires a macOS host for Vision helper, returns a specific structure with confidence and rects, caps results at ~40KB with truncation behavior, and clarifies that rects are pixel coordinates aligned with android_ui_tree. No contradiction with annotations; it enriches them.

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?

The description is dense but well-structured: it leads with the core purpose and use cases, then moves to output structure and constraints. Every sentence contributes new information, but it is longer than strictly necessary—some details (e.g., compile path) could be trimmed without loss. Still, it's front-loaded with the most decision-relevant information and avoids redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given there is no output schema, the description fully compensates by detailing the return shape: {device, screen size in PIXELS, items:[{text, confidence, rect}]}, explains coordinate space (top-left origin, same as android_ui_tree bounds), confidence sorting, truncation behavior, and edge cases (icon-only controls). The agent has all information needed to invoke and interpret results correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (all 3 parameters described), but the description adds practical meaning that goes beyond the schema: query is case-insensitive substring, serial defaults to currently streamed or only connected device, min_confidence defaults to 0.3 with guidance on raising/lowering to control noise. It also explains how parameters relate to the 40KB cap (narrow with query or raise min_confidence), which is not in the schema.

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?

The description clearly states the tool performs OCR on the current Android screen using a Vision helper, and explicitly contrasts it with android_ui_tree by explaining it handles cases where UI tree labels are absent (Compose without semantics, Flutter, WebView, etc.). It specifies the resource (current screen), the action (OCR), and the distinguishing use case, making it unmistakable from sibling tools.

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?

It provides explicit when-to-use guidance: 'Use this when android_ui_tree returns no labels... for text rendered as graphics... or to independently verify what is on screen.' It also tells the agent what NOT to use it for: 'Icon-only controls carry no OCR text: look for their content-desc in android_ui_tree, or use android_ui_rows.' This is a model of prescriptive usage guidance with clear alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zifanersuotang/codex-android-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server