Skip to main content
Glama

AgenTest

AI-driven mobile app testing via MCP. Any AI coding agent can test any Android app.

Your AI reads your code, generates test cases, and executes them against a real emulator -- no test framework, no boilerplate, no testIDs required.

Works with: Claude Code, Cursor, Windsurf, Copilot, Kiro, Antigravity, and any MCP-compatible agent.

How is AgenTest different from Appium or Maestro?

Appium and Maestro are excellent test frameworks. If you have a QA team writing and maintaining structured test suites, they're the right tools. AgenTest solves a different problem.

AgenTest is for developers who don't write tests. If you're building with Cursor, Bolt, v0, or Lovable -- shipping fast, iterating daily, no QA team -- you probably have zero test coverage. AgenTest lets your AI agent test your app with a single prompt. No test code, no YAML, no page objects.

Where AgenTest shines

  • Zero setup overhead. npm install -g agentest + 4 lines of JSON. No Java, no Selenium, no drivers.

  • No testIDs required. Most AI-generated apps don't have testIDs. AgenTest auto-generates @ref selectors and extracts React component names from the Hermes runtime -- icon buttons like <Phone /> and <Microphone /> just work.

  • No test maintenance. The AI sees the current UI tree and adapts. No selectors to update, no flows to rewrite when the UI changes.

  • Source code awareness. When a test fails, the AI reads your code to explain why -- not just which assertion broke.

  • Fast. ~150-400ms per action with the on-device helper + gRPC, comparable to Maestro, faster than Appium.

Where Appium and Maestro are better

  • Deterministic CI suites. If you need the same test to run identically 1000 times, a hand-written Appium/Maestro test is more predictable than an AI-generated one.

  • Cross-platform parity. Appium supports iOS, Android, web, and desktop today. Maestro supports iOS and Android. AgenTest is Android-only (iOS coming soon).

  • Team-scale test management. Page object patterns, test reporting dashboards, parallelized test runs across device farms -- Appium's ecosystem is mature here.

Bottom line

Use Appium or Maestro when you have dedicated QA and need deterministic, version-controlled test suites. Use AgenTest when you're a developer who wants AI-powered testing with zero boilerplate -- especially on apps built with code-generation tools where nothing has a testID.

Related MCP server: Mobile E2E MCP

How it works

Developer: "Test the login flow of my app"

AI agent:
  1. Connects to your emulator via AgenTest
  2. Reads the UI tree (compact, token-efficient format)
  3. Generates test steps from your source code + UI
  4. Executes taps, types, swipes, gestures, assertions
  5. Reports exactly what broke -- down to the line of code

AgenTest handles the hard parts: reading accessibility trees, injecting input via gRPC/ADB/helper APK, syncing with React Native and Flutter frameworks, extracting component metadata from running apps, and detecting when the UI has settled. All test intelligence lives in your AI agent.

Quick start

1. Install

npm install -g agentest

Or from source:

git clone https://github.com/arjun-vegeta/agenTest.git
cd agentest
npm install && npm run build

2. Prerequisites

  • Node.js >= 18

  • Android SDK installed (Android Studio or standalone SDK)

  • Android emulator running (or physical device via USB)

AgenTest auto-discovers adb from standard SDK locations -- no PATH configuration needed. It checks ANDROID_HOME, ANDROID_SDK_ROOT, ~/Library/Android/sdk (macOS), ~/Android/Sdk (Linux), and %LOCALAPPDATA%\Android\Sdk (Windows).

Verify your emulator is running: adb devices should list at least one device.

3. Configure your AI agent

Add AgenTest as an MCP server. The config format depends on your agent:

Claude Code (.claude/settings.json or .mcp.json):

{
  "mcpServers": {
    "agentest": {
      "command": "npx",
      "args": ["-y", "agentest"]
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "agentest": {
      "command": "npx",
      "args": ["-y", "agentest"]
    }
  }
}

VS Code / Copilot (.vscode/mcp.json):

{
  "servers": {
    "agentest": {
      "command": "npx",
      "args": ["-y", "agentest"]
    }
  }
}

Windsurf (~/.codeium/windsurf/mcp_config.json):

{
  "mcpServers": {
    "agentest": {
      "command": "npx",
      "args": ["-y", "agentest"]
    }
  }
}

4. Use it

Tell your AI agent:

Test the login flow. Package name is com.example.myapp.

That's it. The AI handles the rest.

Tools

AgenTest exposes 10 MCP tools:

Tool

What it does

agentest_connect

Connect to emulator, launch app, auto-detect backends, return compact UI tree

agentest_get_ui_tree

Fresh UI snapshot (compact text with @ref tokens)

agentest_run_flow

Execute a batch of actions + assertions, stop on first failure

agentest_reset_app

Force-stop and relaunch, return fresh tree

agentest_screenshot

Capture screen as base64 PNG

agentest_get_logs

Logcat output filtered to app PID

agentest_device_info

Screen size, density, Android version, model

agentest_set_network

Simulate network conditions (offline, 2g, 3g, lte)

agentest_get_shared_prefs

Inspect SharedPreferences (debug builds)

agentest_query_db

Query SQLite databases (debug builds)

Supported actions in agentest_run_flow

Category

Actions

Tap

tap, tap_coordinates, double_tap, double_tap_coordinates, long_press, long_press_coordinates

Input

type, clear_text, press_key

Gestures

swipe, swipe_coordinates, pinch, rotate

Scroll

scroll_to (scroll until target is visible)

Wait

wait (fixed delay), wait_for_stable (wait for UI to settle)

Assert

assert_visible, assert_not_visible, assert_text_equals, assert_text_contains

Compact UI tree

AgenTest returns UI trees in a token-efficient compact format with stable @ref selectors:

screen 1280x2856 com.example.myapp #a1b2c3
  @b1 btn "Sign in"
  @f1 input "Email"
  @f2 input "Password"
  @c1 check "Remember me"
  @b2 btn "Forgot password?"
  "Don't have an account?"
  @l1 link "Sign up"

Ref types: @b = button, @f = input field, @c = checkbox/switch, @s = scrollable, @l = link, @g = generic tappable.

The AI uses refs in subsequent actions:

{ "action": "tap", "target": { "ref": "@b1" } }
{ "action": "type", "target": { "ref": "@f1" }, "value": "user@example.com" }

Traditional selectors (id, text, textContains, className, description) also work alongside refs.

No testIDs needed

For React Native apps built with Cursor, Bolt, v0, or Lovable, AgenTest extracts React component names directly from the running Hermes runtime and labels icon buttons automatically:

@b5 btn "Phone"          -- from React Fiber: <Phone /> component
@b6 btn "DotsVertical"   -- from React Fiber: <DotsVertical /> component
@b7 btn "Microphone"     -- from React Fiber: <Microphone /> component

This means every icon button in a zero-testID app gets a usable label without any code changes to the target app.

Framework support

Framework

Support

How

React Native (debug)

Full

Hermes CDP for fiber labels + JS-idle sync

React Native (release)

Good

A11y tree + text hoisting (no fiber labels)

Flutter (debug)

Full

Dart VM Service for semantics + idle sync

Flutter (release)

Good

A11y tree only

Native Android / Compose

Good

A11y tree + text hoisting

Idle detection: AgenTest auto-waits after every action. The helper APK detects UI stability via accessibility events (~150-300ms). For RN/Flutter debug builds, framework-specific sync probes (Hermes CDP JS-idle, Dart VM frame-idle) run as tail checks to catch async state changes the a11y layer doesn't see.

iOS support (coming soon)

iOS simulator support is in active development -- same MCP tools, same compact tree format, same AI workflow. Android is fully supported today.

Architecture

+------------------------------------------+
|         AI Agent (any MCP client)        |
+------------------------------------------+
                    |  MCP (stdio)
+------------------------------------------+
|           AgenTest Server (TS)           |
|  tree parsing, idle detection, fiber     |
|  extraction, framework sync, ref mgmt   |
+------------------------------------------+
       |              |              |
    gRPC           ADB          Helper APK
  (emulator     (universal     (on-device,
   gestures)    fallback)     auto-installed)
  • Helper APK (~1.8 MB): Auto-installed on first connect. Reads UI trees in ~80ms via in-process UiAutomation (vs ~1.5s with uiautomator dump). Detects idle via accessibility events. Zero user setup.

  • gRPC: Direct emulator input injection at 60 FPS (tap, swipe, long-press, pinch, rotate). Instant, no shell overhead. Emulator only.

  • ADB fallback: Works everywhere -- physical devices, CI, and when gRPC/helper aren't available. Slower but always functional.

  • Framework sync: Hermes CDP (React Native) and Dart VM Service (Flutter) for JS/Dart idle detection and React Fiber component extraction.

Performance

Mode

Per-action latency

When

Helper + gRPC

~150-400ms

Emulator (best case)

Helper + ADB

~300-600ms

Physical device

ADB only

~1.5-3s

Fallback when helper can't install

Optional: Idling Bridge

For apps with heavy background work (network requests, sync queues), add the opt-in idling bridge AAR to eliminate flakiness:

// android/app/build.gradle.kts
dependencies {
    debugImplementation(
        files("../../node_modules/agentest/android-helper/prebuilt/agentest-idling-bridge.aar")
    )
}

AgenTest auto-detects it on the next connect. See docs/setup.md for details.

Troubleshooting

adb not found

AgenTest auto-discovers adb from standard locations. If it still can't find it:

  1. Set ANDROID_HOME in your shell profile:

    # macOS / Linux
    export ANDROID_HOME=~/Library/Android/sdk   # macOS
    export ANDROID_HOME=~/Android/Sdk           # Linux
    
    # Windows (PowerShell)
    $env:ANDROID_HOME = "$env:LOCALAPPDATA\Android\Sdk"
  2. Or pass PATH explicitly in your MCP config:

    {
      "mcpServers": {
        "agentest": {
          "command": "npx",
          "args": ["-y", "agentest"],
          "env": {
            "PATH": "/path/to/android/sdk/platform-tools:/usr/local/bin:/usr/bin:/bin"
          }
        }
      }
    }

No devices found

  • Make sure your emulator is fully booted (past the Android boot animation)

  • Run adb devices manually -- you should see at least one device (not offline or unauthorized)

  • Try adb kill-server && adb start-server to reset the connection

Helper APK didn't install

If agentest_connect returns "helperInstalled": false, AgenTest falls back to the slower ADB path automatically. Everything still works, just ~3-5x slower tree reads. To fix:

  • Check that the emulator has enough disk space

  • Make sure the emulator is fully booted before connecting

  • Try adb uninstall com.agentest.helper.test && adb uninstall com.agentest.helper then reconnect

UI tree is empty

  • The app may still be loading. Wait a moment and call agentest_get_ui_tree again

  • Some screens (splash, OpenGL/SurfaceView) don't expose accessibility nodes

  • Use agentest_screenshot as a fallback to see what's on screen

Slow performance

AgenTest has three speed tiers:

  1. Helper + gRPC (~150-400ms/action) -- best, emulator only

  2. Helper + ADB (~300-600ms/action) -- physical devices

  3. ADB only (~1.5-3s/action) -- fallback when helper can't install

If you're stuck on tier 3, check the helper install issue above.

Documentation

Development

npm install          # install dependencies
npm run build        # compile TypeScript
npm run dev          # watch mode
npm test             # run tests (293 tests)
npm run typecheck    # type check
npm run lint         # lint

License

MIT

Available Tools

10 tools
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.

ParametersJSON Schema
NameRequiredDescriptionDefault
backendNoInput backend: "auto" (default) tries gRPC then falls back to ADB; "adb" forces ADB only; "grpc" requires gRPC (emulator only).
verboseNoInclude framework-sync diagnostics in the response.
deviceIdNoSpecific device/emulator ID from "adb devices". Omit to use the first connected device.
packageNameYesAndroid package name (e.g. "com.example.myapp")

TDQS

A3.9/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. Describes output format (compact text with refs) and optional verbose diagnostics, but does not disclose error scenarios or side effects beyond launching the app.

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?

Concise, front-loaded with purpose, then explains output format. No unnecessary repetition. Could be slightly more structured with bullet points for the format.

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

Completeness4/5

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

Given no output schema, description explains the return format well. Covers parameters implicitly. Lacks error handling or prerequisites, but adequate for a connector tool.

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

Parameters3/5

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

Schema has 100% description coverage for parameters, so description adds minimal extra value. It mentions verbose:true for diagnostics, which is helpful but not critical.

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?

Clearly states it connects to an Android emulator/device and launches an app, returning the initial UI screen. Differentiates from sibling tools (e.g., agentest_get_ui_tree, agentest_run_flow) by being the first-step connection tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage as the first step before other agentest tools. No explicit when-not or alternatives, but the context suggests it's the starting point.

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

agentest_device_infoA

Get device/emulator info: screen size, density, Android version, SDK level, model. Use to understand the test environment.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description must fully disclose behavior. It indicates a read-only operation ('Get'), but does not explicitly state that it is non-destructive, nor does it mention authentication requirements, rate limits, or side effects. For a simple getter, this is minimally adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that immediately states the action and lists key fields. There is no redundancy or unnecessary information.

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

Completeness4/5

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

Given the lack of output schema, the description provides a list of returned fields (screen size, density, etc.), which is sufficient for understanding the output. It does not specify format or structure, but for a simple attribute list, this is mostly complete.

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

Parameters4/5

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

The input schema has no parameters, so schema coverage is 100%. The description adds no parameter information, which is fine as there are none. With zero parameters, the baseline is 4, and the description does not detract.

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 'Get device/emulator info' and lists specific attributes (screen size, density, etc.). It distinguishes from sibling tools, which all perform different functions like connecting, logging, or querying.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use to understand the test environment,' providing clear context for when to invoke this tool. While it doesn't mention alternatives or when not to use, the sibling list implies this is the sole tool for device information.

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

agentest_get_logsA

Get recent app logs (logcat) filtered to the target app. Use to diagnose failures — API errors, crashes, exceptions.

ParametersJSON Schema
NameRequiredDescriptionDefault
maxLinesNoMax log lines to return (default: 200)
packageNameNoPackage name to filter logs for. Defaults to the last connected app.

TDQS

A3.6/5.0
Behavior2/5

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

No annotations provided, so description carries full burden. Only states it gets logs without disclosing any behavioral traits like whether logs are cleared, authentication needed, or performance impact. Lacks detail beyond basic read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two front-loaded sentences with no wasted words. First sentence defines action and resource, second provides usage guidance.

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

Completeness4/5

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

Given 2 optional params, no output schema, and no nested objects, the description adequately covers purpose and usage. Slightly incomplete on output format or interpretation, but sufficient for a simple tool.

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

Parameters3/5

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

Input schema has 100% coverage with descriptions for both parameters. Description does not add additional meaning beyond what schema provides, so baseline 3 is appropriate.

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?

States verb 'Get', resource 'app logs (logcat)', and purpose 'diagnose failures — API errors, crashes, exceptions'. Clearly distinguishes from sibling tools like agentest_device_info and agentest_get_ui_tree.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides intended use case 'diagnose failures' and examples, but does not explicitly mention when not to use or suggest alternative tools for other scenarios.

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYesSharedPreferences filename (e.g. "my_prefs.xml" or "my_prefs")
packageNameNoPackage name. Defaults to the last connected app.

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description must disclose behaviors. It states the tool is a read operation and requires a debuggable build, but lacks details about error handling (e.g., file not found) or any side effects, leaving some gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two concise sentences with no filler, clearly stating the action, purpose, and a critical requirement.

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

Completeness4/5

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

For a simple read tool with two well-documented parameters, the description covers the core functionality and a key prerequisite. However, it does not specify return value format or behavior in edge cases, which would improve completeness.

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

Parameters3/5

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

Schema coverage is 100% with detailed descriptions for both parameters. The description adds contextual examples (e.g., '.xml' suffix) but does not significantly enhance understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the verb 'Read' and the resource 'SharedPreferences XML file', with a stated purpose 'verify stored state'. It differentiates from sibling tools like 'agentest_query_db' (database) and 'agentest_device_info' (device info), but could be more explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions when to use it ('verify stored state') and a prerequisite ('Requires a debuggable build'), but does not indicate when not to use it or provide alternatives like 'agentest_get_logs' or 'agentest_query_db'.

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

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:

  • format: "compact" (default) or "full" (legacy JSON tree with bounds + classNames — use for debugging or layout inspection)

  • depth: max tree depth (omit for unlimited)

  • onlyInteractive: true to drop plain text lines (hoisted labels still appear on interactives)

ParametersJSON Schema
NameRequiredDescriptionDefault
depthNoMax tree depth. Deeper subtrees are summarized as "+N interactive elements".
formatNoOutput format: "compact" (default, indented text with @refs) or "full" (JSON tree with bounds/classNames for debugging)
onlyInteractiveNoDrop plain text lines — only show interactive elements with refs. Labels are still hoisted onto interactives.

TDQS

A4.3/5.0
Behavior4/5

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

No annotations exist, so description must disclose behavior. It explains that each call returns a fresh snapshot, refs can become stale with clear errors, and provides output formats. Could mention that it's read-only and has no side effects, but sufficient for safe invocation.

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?

Well-structured with bullet points for options. First sentence could be tighter but is effective. Every sentence adds value without redundancy. Awarding 4 due to minor verbosity in the introductory sentence.

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

Completeness4/5

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

Despite no output schema, description explains return formats (compact text with @refs, full JSON tree). Covers error conditions (stale refs) and usage patterns. Lacks details on bounds/classNames in full format, but sufficient for agent to understand output.

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

Parameters4/5

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

Schema covers all 3 parameters with descriptions. The tool description adds value by explaining defaults ('compact'), usage tips ('use full for debugging'), and context for options ('onlyInteractive drops plain text'). Descriptions enhance beyond schema alone.

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 fetches a fresh UI screen snapshot with compact text by default. It distinguishes from sibling tools like screenshot (visual) or device_info (metadata) by focusing on interactive element hierarchy and refs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear guidance on when to call this tool (to get fresh refs) and how to use refs in selectors with error handling. Lacks explicit when-not-to-use or comparison with alternatives, but usage context is well implied.

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSQL query (e.g. "SELECT * FROM users LIMIT 10")
databaseYesDatabase filename (e.g. "app.db")
packageNameNoPackage name. Defaults to the last connected app.

TDQS

A4/5.0
Behavior3/5

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

No annotations provided. Description adds the debuggable build requirement and implies read-only intent ('verify DB state'), but does not clarify if arbitrary SQL (including mutations) is allowed, nor does it describe error handling or output format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no fluff. The first sentence immediately conveys the tool's action and scope. Highly efficient.

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

Completeness4/5

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

Given the tool's simplicity and lack of output schema, the description covers the essential aspects: purpose, usage, and prerequisite. Minor omission: return format (rows) would be helpful but not critical.

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

Parameters3/5

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

Schema coverage is 100% and parameter descriptions in the schema are adequate. Description adds minimal extra meaning (mentions Room and testing context) but does not significantly enhance parameter understanding.

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 it runs a SQL query against an app SQLite database for verifying DB state after test actions. It distinguishes from sibling tools which cover other testing aspects like device info or logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit use case ('verify DB state after test actions') and a prerequisite ('Requires a debuggable build'). Does not mention alternatives or when not to use, but sibling tools are sufficiently different.

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

agentest_reset_appA

Force-stop and relaunch the app. Returns fresh compact tree with @refs. Use between test cases for clean state.

ParametersJSON Schema
NameRequiredDescriptionDefault
packageNameNoPackage name to reset. Defaults to the last connected app.

TDQS

A4.4/5.0
Behavior4/5

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

Discloses destructive action (force-stop and relaunch) and return value. With no annotations, this level of detail is adequate, though it could mention side effects like lost app state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences front-loading action, return, and usage. No wasted words.

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

Completeness4/5

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

For a simple tool with one optional parameter and no output schema, the description is complete: action, return, and usage are all covered.

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

Parameters4/5

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

Schema covers 100% of parameters, and description adds default behavior for packageName ('Defaults to the last connected app'), providing extra value.

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?

Description clearly states it force-stops and relaunches the app, returning a fresh compact tree. The verb and resource are specific, and it distinguishes from sibling tools like agentest_get_ui_tree.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises use between test cases for clean state, providing clear context. No explicit alternatives given, but the usage is well-scoped.

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

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
stepsYesOrdered list of actions and assertions to execute

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It effectively describes key behaviors: the tool stops on first failure, automatically waits after actions, and conditionally includes the UI tree in the response. It also explains the screenFingerprint/screenChanged mechanism. This is thorough but could additionally describe what happens to the app state upon failure (e.g., partial changes).

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 well-structured with a clear opening sentence followed by organized lists of actions, assertions, and selectors. It is informative without being overly verbose. Every sentence adds value, though some lines (e.g., selector details) could be slightly tightened.

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

Completeness4/5

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

Given the tool's complexity (multiple action types, selector options, response behavior) and the absence of an output schema, the description covers most critical aspects: how to execute flows, behavior on failure, auto-wait, response structure (screenFingerprint/screenChanged), and selector syntax. It is nearly complete but could explicitly outline the full response shape for agent clarity.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds significant meaning beyond the schema: it lists all available actions and assertions, explains selector priority (ref fastest), and provides example syntax. This helps an agent understand how to construct the 'steps' array beyond what the schema's formal descriptions offer.

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 'Execute a batch of UI actions and assertions. Stops on first failure.' This specific verb+resource combination unambiguously communicates the tool's function and distinguishes it from sibling tools like agentest_get_ui_tree (which only retrieves the tree) and agentest_screenshot (which captures an image).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage: it explains how to target elements using refs from the last tree snapshot versus traditional selectors, advises against adding 'wait' or 'wait_for_stable' steps due to auto-waiting, and describes when to reuse refs based on the screenChanged flag. However, it does not explicitly state when NOT to use this tool (e.g., for single actions or non-UI tasks) relative to siblings.

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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

No annotations provided, so the description carries full burden. It discloses the output format but omits potential side effects (e.g., screen flash) or permission requirements. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no wasted words. The first sentence states the action and output; the second provides usage guidance. Well front-loaded and efficient.

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

Completeness4/5

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

Given zero parameters, no output schema, and no annotations, the description is mostly complete. It covers purpose, output format, and usage condition. Could mention limitations like app foreground requirement.

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

Parameters3/5

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

Schema has no parameters (coverage 100%), so the description adds no parameter info. Baseline 3 is appropriate as no additional semantics are needed.

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 action ('Capture a screenshot'), the output format ('base64-encoded PNG'), and distinguishes from the sibling tool 'agentest_get_ui_tree' by specifying when to use it ('when the accessibility tree is insufficient').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit condition for use ('when the accessibility tree is insufficient — custom canvas, images, visual layout issues'), implying when not to use. Could be enhanced by stating that it should be used sparingly or that it captures full screen.

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

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
wifiNoEnable/disable WiFi
delayNoLatency: preset (none/gprs/edge/umts) or custom "min:max" ms
speedNoCustom speed as "up:down" kbps (e.g. "100:1000")
presetNoSpeed preset: gsm/gprs/edge/umts/3g/hsdpa/lte/full, or "offline" to disable all network
airplaneModeNoEnable/disable airplane mode

TDQS

A4.2/5.0
Behavior4/5

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

No annotations provided, so description carries full burden. It explains presets, custom speed/delay, and toggles for wifi and airplane mode. Does not mention side effects or persistence, but simulation behavior is well-covered.

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?

First sentence states purpose, then followed by clear bullet-like listings. Slightly verbose but well-organized and front-loaded. Every part adds value.

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

Completeness3/5

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

No output schema, so description should hint at return value or side effects. It does not mention what the tool returns (e.g., success/failure) or whether changes are persistent. Missing this context.

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

Parameters4/5

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

Schema coverage is 100% with descriptions. Description adds value by explaining preset meanings, custom speed format ('up:down' kbps), and latency as 'min:max' ms, going beyond schema alone.

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?

Description clearly states 'Simulate network conditions on the emulator for testing offline/slow connections.' Verb and resource are specific, and sibling tools are unrelated, so no confusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Purpose implies when to use (testing offline/slow connections). Provides presets and custom options but does not explicitly state when not to use or mention alternatives. Still clear and adequate.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 10 tool updatesv0.1.2
    • First observedagentest_connect
    • First observedagentest_device_info
    • First observedagentest_get_logs
    • First observedagentest_get_shared_prefs
    • First observedagentest_get_ui_tree
    • First observedagentest_query_db
    • First observedagentest_reset_app
    • First observedagentest_run_flow
    • First observedagentest_screenshot
    • First observedagentest_set_network

TDQS

A4.2/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/arjun-vegeta/agenTest'

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