Skip to main content
Glama

adb_test_gen_from_ui

Analyzes the current Android screen to generate a tap-based test workflow that screenshots each interactive element and checks for crashes, producing JSON compatible with adb_workflow_run.

Instructions

Analyze the current screen and generate a test workflow that taps each interactive element, takes screenshots, and verifies the app doesn't crash. Produces a workflow JSON compatible with adb_workflow_run.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "packageName": "<packageName>"
    },
    "name": "adb_test_gen_from_ui"
  }
}

Input Schema

NameRequiredDescriptionDefault
deviceNoDevice serial
packageNameYesPackage name to monitor during test (used for logcat filtering and crash detection)
returnToStartNoPress Back after each tap to return to the starting screen
screenshotAfterEachNoTake a screenshot after each tap

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.1.1

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description usefully discloses the generated workflow's tapping, screenshot, and crash-verification behavior. However, it does not explicitly confirm that generation itself does not execute the workflow or mutate the device, and it leaves whether the JSON is returned directly or persisted implicit.

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 compact sentences front-load the purpose and then state output compatibility. There is no filler or redundant explanation.

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 four-parameter generator, the screen scope, workflow behavior, and downstream compatibility provide nearly enough context alongside the fully documented schema. Because there is no output schema, explicitly stating how the JSON is delivered and that this tool only generates rather than runs the workflow would remove the remaining ambiguity.

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 description coverage is 100%, so all four parameters, including defaults and crash-monitoring semantics, are already documented. The description reinforces screenshots and crash detection but adds no parameter meaning beyond the schema, making the baseline score 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?

The description specifies the source (the current screen), the action (analyze and generate), and the artifact (a test workflow JSON). It also distinguishes generation from execution by naming adb_workflow_run as the compatible consumer, while the UI-based source differentiates it from adb_test_gen_from_intents.

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?

It gives a clear use case: generate a UI-driven smoke-test workflow from the visible screen for later use with adb_workflow_run. It does not explicitly explain when to prefer adb_test_gen_from_intents or mention related validation and saving tools.

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

Deploy Server

Other Tools