Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ADB_PATHNoPath to adb executable (auto-detected if unset).
ADB_SERIALNoDefault device serial (e.g., USB phone serial or emulator address).
ANDROID_HOMENoAndroid SDK root used for adb auto-detection.
ANDROID_SDK_ROOTNoAlternative Android SDK root.
ADB_MCP_ALLOW_SHELLNoSet to '1' or 'true' to enable the opt-in run_shell escape hatch (default off).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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

Tools

Functions exposed to the LLM to take actions

NameDescription
list_packagesA

List installed package names. filter = case-insensitive substring. only_third_party excludes system apps; include_paths returns {package, apk}.

launch_packageB

Launch an app by package via its LAUNCHER intent (idempotent). Returns {package, pid, status}.

launch_activityB

Start an explicit activity, e.g. 'com.app/.MainActivity' (am start -n). Returns the am output and resulting pid if resolvable.

force_stopB

Force-stop an app (idempotent). Returns {package, status}.

kill_backgroundA

Kill an app's background processes (am kill, gentler than force-stop).

clear_app_dataB

Clear ALL app data for a package (destructive: wipes saves/cache/prefs).

app_statusC

Return {package, pid, running} for a package.

get_current_activityB

Return the currently focused activity/package (foreground app).

get_package_infoB

Return structured package info: versionName, versionCode, targetSdk, minSdk, installer, firstInstall/lastUpdate times, and granted runtime permissions.

install_apkA

Install an APK, or a split-APK set via install-multiple when >1 path given. replace=-r, grant_permissions=-g, downgrade=-d. Returns {status, message}.

uninstallB

Uninstall a package. keep_data=True keeps data/cache dirs (-k).

grant_permissionB

Grant a runtime permission, e.g. 'android.permission.CAMERA' (pm grant).

revoke_permissionC

Revoke a runtime permission (pm revoke).

set_package_enabledB

Enable or disable a package (pm enable / pm disable-user).

start_serviceC

Start a service by component 'pkg/.Service' (am startservice).

send_broadcastB

Send a broadcast intent (am broadcast -a <action>). Optional target component and string extras {key: value}.

get_devicesA

List attached devices/emulators with state and transport.

Returns [{serial, state, is_usb, model, device, transport_id}]. is_usb is False for network devices (serials containing ':', e.g. WSA/emulators).

get_stateB

Return the connection state of a device: device / offline / unauthorized.

adb_versionA

Return the host adb client version string and the resolved adb path.

get_device_propertiesB

Return the target environment: model, manufacturer, abi, android release, sdk level, build fingerprint, and screen info. Tells the agent exactly what it is targeting before acting.

get_screen_infoB

Return effective display size and density: {width, height, density, raw}.

Prefers the Override size (what input coordinates map to) when set.

get_batteryB

Return battery level/status/health/temperature (from dumpsys battery).

connectB

adb connect ip:port — attach a network device (WSA, emulator, wireless).

disconnectA

adb disconnect a network device (or all if host_port omitted).

wait_for_deviceA

Block until the device is online (or timeout). Useful after reboot/connect.

rebootB

Reboot the device. mode: '' (normal), 'recovery', 'bootloader', or 'sideload'.

set_default_deviceA

Set the session default device serial (overrides ADB_SERIAL for later calls). Pass an empty string to clear it.

get_default_deviceA

Return the currently active default device serial (runtime or ADB_SERIAL).

root_adbA

Restart adbd as root (adb root). Only works on rooted/userdebug builds; on production builds use su via read_file(as_root=True) etc. instead.

unroot_adbB

Restart adbd without root (adb unroot).

remountB

Remount /system (and other partitions) read-write (adb remount). Needs root.

list_filesA

List a device directory: [{name, size, is_dir, is_link, perms}]. as_root uses su -c ls on rooted devices. Symlinked dirs (e.g. /sdcard on Samsung) are dereferenced so their contents are listed, not the link.

file_existsC

Check whether a path exists on the device. Returns {exists, is_dir}.

stat_fileC

Return stat info for a device path: {size, mtime, perms, uid, gid} (best-effort).

pullC

Pull a file/dir from the device to host path local.

pushC

Push a host file local to device path remote.

read_fileB

Read a text file from the device (up to max_bytes). as_root uses su -c cat (WSA/Magisk). Returns {remote, truncated, content}.

write_fileA

Write text content to a device file by pushing a temp file (handles any content safely, unlike shell echo). as_root pushes to /data/local/tmp then su -c cp into place. Returns {status, remote, bytes}.

make_dirC

Create a directory on the device (mkdir -p).

delete_fileA

Delete a device file or (recursive=True) directory. DESTRUCTIVE. Refuses obviously dangerous roots like '/', '/system', '/data'.

tapC

Tap the screen at pixel (x, y).

long_pressA

Long-press at (x, y) for duration_ms (implemented as a zero-distance swipe).

swipeB

Swipe from (x1,y1) to (x2,y2) over duration_ms. Use for scrolling/flinging.

dragB

Drag (slow swipe) from (x1,y1) to (x2,y2). Alias of swipe with a longer default.

textB

Type a string into the focused field. Spaces and shell-special characters are escaped so the literal text is entered.

keyeventC

Send a key event. Accepts a numeric keycode or a name like BACK, HOME, ENTER, TAB, DEL, APP_SWITCH, VOLUME_UP (KEYCODE_ prefix optional).

press_homeC

Press the HOME button.

press_backC

Press the BACK button.

press_recentsA

Open the recent-apps / overview screen (APP_SWITCH).

press_powerB

Press the POWER button (toggles screen on/off).

press_enterC

Press ENTER.

wake_and_unlockA

Wake the screen and swipe up to dismiss a non-secure lock screen.

logcat_startA

Start a background logcat capture to a temp file. Read it with logcat_dump/ logcat_filter; end it with logcat_stop. Only one capture runs at a time. buffers optionally selects e.g. 'main,system,crash'.

logcat_stopA

Stop the background logcat capture started by logcat_start.

logcat_dumpA

Return recent logcat lines as records {time, pid, tid, level, tag, message}.

Reads the running capture's buffer if active, else does a one-shot logcat -d. tags = filter by tag substring(s); priority = min level V/D/I/W/E/F; message_contains = substring filter on the message; tail = newest N records.

logcat_filterC

Convenience: logcat_dump filtered to the given tags (e.g. ['Unity','libc','DEBUG']).

logcat_clearC

Clear the device logcat ring buffers (logcat -c).

get_crash_logB

Dump the 'crash' logcat buffer (native + Java crashes), newest tail records.

get_anr_tracesA

Pull the most recent ANR trace file (/data/anr/traces.txt or /data/anr/). Returns {status, local, size} (needs root/permission on some devices).

capture_bugreportB

Capture a full bugreport zip to local_path (slow; can take minutes).

capture_screenA

Capture a screenshot and return it as an inline PNG image. If save_path is given, also writes the PNG there. Ideal for an observe->decide->tap loop / OCR.

capture_screen_to_fileA

Capture a screenshot and save it to save_path, returning {status, path, bytes} (no inline image — use when you only need the file).

capture_screen_base64A

Capture a screenshot and return {format, bytes, base64} — for when a raw base64 payload is preferred over an inline image.

record_screen_startA

Start recording the screen on-device (screenrecord runs in the background). time_limit_s caps duration (screenrecord max 180s per segment). size like '720x1280' to downscale. Call record_screen_stop to finish and pull the mp4.

record_screen_stopA

Stop the background screen recording, pull it to local_path, and clean up the on-device file. Returns {status, local, size}.

forward_portA

adb forward tcp:local tcp:remote — forward a HOST port to a DEVICE port (host connects locally, traffic reaches the device).

reverse_portA

adb reverse tcp:device tcp:host — map a DEVICE port to a HOST port so the app's 127.0.0.1:<device_port> traffic reaches your PC (e.g. a local API/CDN shim).

list_forwardsB

List active adb forward rules: [{serial, local, remote}].

list_reversesC

List active adb reverse rules: [{remote, local}].

remove_forwardB

Remove a single adb forward rule for tcp:local_port.

remove_reverseC

Remove a single adb reverse rule for tcp:device_port.

clear_forwardsB

Remove ALL forward and reverse rules for the device.

get_ip_addressB

Return the device's IPv4 address on an interface (default wlan0).

set_wifiB

Enable/disable Wi-Fi via svc wifi (may need root on newer Android).

set_mobile_dataB

Enable/disable mobile data via svc data (may need root on newer Android).

set_airplane_modeB

Toggle airplane mode (settings + broadcast). May need root on newer Android.

get_propA

Read a single system property by name, or ALL props as a dict when name is omitted (parses getprop).

set_propB

Set a system property (setprop). Many props are read-only or need root.

get_settingB

Read an Android setting. namespace = 'system' | 'secure' | 'global'.

put_settingC

Write an Android setting. namespace = 'system' | 'secure' | 'global'.

list_processesA

List running processes (ps -A): [{pid, ppid, name, user}]. filter = name substring.

get_meminfoA

Return memory info. With a package: that app's total PSS (kB); otherwise the global summary (Total/Free/Used/Lost RAM). Returns parsed fields + raw text.

get_topB

Return a one-shot top snapshot of the top count processes by CPU (raw text).

get_uptimeB

Return device uptime (seconds + human string) from /proc/uptime and uptime.

dumpsysA

Run dumpsys <service> for a NAMED service (e.g. 'battery', 'wifi', 'activity', 'meminfo', 'connectivity') and return the raw text (capped). Scoped to a service name — not an arbitrary shell.

list_servicesC

List all dumpsys service names available on the device.

run_shellA

Run an arbitrary device shell command. DISABLED by default — set the env var ADB_MCP_ALLOW_SHELL=1 to enable. Prefer the specific scoped tools; this exists only as an explicit, opt-in escape hatch. Returns {rc, output}.

dump_uiA

Dump the current on-screen view hierarchy as a flat list of elements {text, resource_id, content_desc, class, clickable, enabled, bounds:{...,center_x,center_y}}.

non_empty_only drops nodes with no text/id/description (usually layout containers); clickable_only keeps only clickable nodes.

find_elementsA

Find on-screen elements matching any of text / resource_id / content_desc. Substring match by default; exact=True requires a full match. Returns the same element records as dump_ui, each with a bounds.center for tapping.

tap_elementA

Find an element (by text/resource_id/content_desc) and tap its center. index selects among multiple matches. Returns the matched element + tap point.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3/5.0

Scored across 90 tools

Disambiguation3/5

Many tools have distinct purposes, but several overlapping groups exist (e.g., capture_screen variants, tap vs tap_element, launch_package vs launch_activity, force_stop vs kill_background, logcat_dump vs logcat_filter). With 90 tools, an agent may struggle to select the right one, though descriptions help clarify boundaries.

Naming Consistency4/5

All tool names use snake_case, providing a consistent surface style. However, there is a mix of verb_noun (list_packages, get_devices) and bare verbs (connect, reboot, tap), and inconsistent verb choices for similar operations (set_prop vs put_setting). These are minor deviations from a uniform pattern.

Tool Count1/5

90 tools is far above the recommended 3-15 range and exceeds the 50+ threshold for extreme mismatch. While ADB is a complex domain, the tool count is excessive and many tools could be consolidated (e.g., screen capture variants, logcat controls), creating a high cognitive load for agents.

Completeness4/5

The set covers a very broad range of ADB functionality: device management, app lifecycle, file operations, input, logging, screen capture, networking, settings, and UI automation. Minor gaps exist (e.g., setting display size/density, managing users, kernel logs), but agents can work around most tasks.

Maintenance

ActivityMaintained
ResponsivenessNo issues