Skip to main content
Glama
xiaoran7

Agent-Android

by xiaoran7

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ADB_PATHNoPath to the adb executable
AGENT_ANDROID_DATA_DIRNoData directory for SQLite, locks, and optional binaries
AGENT_ANDROID_WEB_HOSTNoWeb listening address127.0.0.1
AGENT_ANDROID_WEB_PORTNoWeb port8765
AGENT_ANDROID_API_TOKENNoAPI token required for non-loopback web access
AGENT_ANDROID_STREAM_BACKENDNoStream backend: 'screenshot' or 'scrcpy'screenshot

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_devicesA

List all currently visible Android devices (USB and already-connected WiFi).

screenshotB

Capture the current screen of the given device as an image.

get_screen_sizeA

Get active and physical screen dimensions without transferring a screenshot.

tapC

Tap the screen at pixel coordinates (x, y).

double_tapA

Double-tap the screen at pixel coordinates (x, y).

swipeB

Swipe from (x1, y1) to (x2, y2) over duration seconds.

key_eventA

Press a named key (home, back, recent, volume_up, ...) or raw Android keycode.

input_textA

Type text into the focused field.

``auto`` only uses an unattended-safe ADBKeyBoard backend and fails clearly
when it isn't installed. ``raw`` is explicit best-effort ASCII and can be
intercepted or changed by the active Android IME.
clear_textB

Clear text in the currently focused input field.

text_input_capabilitiesA

Inspect the active IME and whether reliable Unicode input is available.

launch_appC

Launch an app and, by default, wait until it is confirmed foreground.

wait_for_appB

Wait until the requested Android package becomes the foreground app.

list_appsB

List installed package names on the device.

dump_uiA

Get all UI elements on screen (text/resource-id/class/bounds/clickable) via the accessibility tree.

screen_summaryA

Return compact visible labels and bounds; prefer this over dump_ui for routine inspection.

find_elementB

Find the first UI element matching the given (non-None) attributes. Returns None if not found.

wait_for_elementC

Wait until an accessibility element appears, then return it.

tap_elementB

Find a UI element by attribute(s) and tap its center. Raises if no match is found.

ocr_screenA

Run OCR on the current screen for UIs with no usable accessibility tree (canvas/games/WebView). Returns matched text + bounding box + confidence.

ocr_tapA

Find text on screen via OCR (best fuzzy match) and tap its center. Raises if no good match is found.

search_appsB

Search installed package names containing keyword.

get_current_appA

Get the package name of the currently foregrounded app.

tcpip_pair_deviceA

Switch a USB-connected, already-trusted device into WiFi mode and connect to it. Requires the device to have been used over USB at least once already.

connect_deviceA

Connect to a WiFi device by ip:port (already tcpip-enabled or paired).

pair_with_codeB

Pair with an Android 11+ wireless-debugging device using its six-digit code.

reconnect_remembered_devicesA

Attempt to reconnect every remembered WiFi ADB device.

list_remembered_devicesA

List WiFi device_ids previously paired/connected, whether or not currently reachable.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/xiaoran7/Agent-Android'

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