AgenTest
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| agentest_connectA | Connect to an Android emulator/device and launch the app. Returns the initial UI screen in compact text format with @ref tokens you can use as selectors. The compact format uses one line per element: @b1 btn "Sign in" — button, ref @b1 @f1 input "Email" — text field, ref @f1 @c1 check "Remember me" — checkbox @s1 scroll — scrollable area @l1 link "Forgot?" — clickable text link @g1 tap — generic clickable (unlabeled) "plain text" — non-interactive text Use refs in subsequent run_flow steps: { "action": "tap", "target": { "ref": "@b1" } } Traditional selectors (id/text/className/description) still work alongside refs. Pass verbose:true to include framework-sync diagnostics. |
| agentest_get_ui_treeA | Get a fresh snapshot of the current UI screen. Returns compact text with @ref tokens by default. Use refs in selectors: { "ref": "@b1" }. If a ref is stale (screen changed), you'll get a clear error — just call this tool again for fresh refs. Options:
|
| agentest_run_flowA | Execute a batch of UI actions and assertions. Stops on first failure. TARGET ELEMENTS using refs from the last tree snapshot: { "action": "tap", "target": { "ref": "@b1" } } Or use traditional selectors (id/text/textContains/className/description/index) — both work. DO NOT add "wait" or "wait_for_stable" steps — the server auto-waits after every action. RESPONSE: includes screenFingerprint and screenChanged. If screenChanged is false and success is true, the UI is exactly where you left it — reuse your prior refs without re-snaphotting. The tree is only included when the screen actually changed or the flow failed. ACTIONS: tap, tap_coordinates, type, clear_text, swipe, swipe_coordinates, long_press, long_press_coordinates, double_tap, double_tap_coordinates, press_key, scroll_to. ASSERTIONS: assert_visible, assert_not_visible, assert_text_equals, assert_text_contains. SELECTORS: ref (fastest — from last snapshot), id (substring), text (exact), textContains (substring), className (short or full name), description (substring), index (0-based Nth match). |
| agentest_reset_appA | Force-stop and relaunch the app. Returns fresh compact tree with @refs. Use between test cases for clean state. |
| agentest_get_logsA | Get recent app logs (logcat) filtered to the target app. Use to diagnose failures — API errors, crashes, exceptions. |
| agentest_screenshotA | Capture a screenshot of the current screen as a base64-encoded PNG. Use when the accessibility tree is insufficient — custom canvas, images, visual layout issues. |
| agentest_device_infoA | Get device/emulator info: screen size, density, Android version, SDK level, model. Use to understand the test environment. |
| agentest_get_shared_prefsA | Read a SharedPreferences XML file from the app. Use to verify stored state (tokens, user info, settings). Requires a debuggable build. |
| agentest_query_dbA | Run a SQL query against an app SQLite database (including Room). Use to verify DB state after test actions. Requires a debuggable build. |
| agentest_set_networkA | Simulate network conditions on the emulator for testing offline/slow connections. Presets: "full" (unlimited), "lte" (58/173 Mbps), "3g" (384 kbps), "edge" (237/474 kbps), "gsm" (14 kbps), "gprs" (29/58 kbps), "offline" (wifi + data off). Latency presets: "none", "gprs" (150-550ms), "edge" (80-400ms), "umts" (35-200ms). Custom: "speed" as "up:down" kbps, "delay" as "min:max" ms. Also: toggle wifi and airplaneMode explicitly. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Each tool targets a distinct aspect of Android app testing: connection, device info, logs, preferences, UI tree, database, app reset, flow execution, screenshots, and network simulation. No overlap in functionality.
All tools follow the pattern 'agentest_' + descriptive verb phrase in snake_case (e.g., 'agentest_connect', 'agentest_get_logs'), providing a predictable and clear naming convention.
With 10 tools, the set is well-scoped for the domain of Android UI testing, covering essential operations without being overly large or too sparse.
The tool surface covers the full lifecycle of test sessions: setup (connect, reset), interaction (run_flow with actions/assertions), diagnostics (logs, screenshots, device info, shared prefs, database queries), and conditioning (network simulation). No obvious gaps.