Skip to main content
Glama

android_session_start

Start an Android app driving session: optionally build, install, and launch the app, then return a screenshot and UI dump. Automatically reports build failures or crash stack traces for debugging.

Instructions

Start a driving session: optionally build+install, launch the app, and return the first look.

This is the main entry point. Returns a screenshot (as an image you can see directly) plus the UI dump. If the build fails you get the full build report; if the app crashes on launch you get the stack trace mapped to source instead of a screenshot of the launcher.

Args: package: App package id, e.g. com.example.app activity: Launch activity; resolved automatically if omitted. device: Device serial; defaults to the first physical device. project_dir: Gradle project root. Needed for reinstall, and lets crash stack traces be mapped to source files. reinstall: Build with android_build and install the result first. fresh: pm clear the app first, wiping its data for a clean run. module, variant: Which APK to build/install. release_locks, allow_uninstall: Passed through to the build/install (see android_build). scale: Long-edge px for the returned screenshot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
freshNo
scaleNo
deviceNo
moduleNoapp
packageYes
variantNodebug
activityNo
reinstallNo
project_dirNo
release_locksNo
allow_uninstallNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 carries the full burden of behavioral disclosure. It does well: it explains the side effects of reinstall (build+install), fresh (pm clear wiping data), and the conditional behavior on build failure (full build report) and crash (stack trace mapped to source). It also notes that activity is resolved automatically if omitted. It doesn't mention whether the session holds locks or how long it runs, but the disclosed behaviors are substantial and directly useful.

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: a concise opening sentence, a clear 'main entry point' statement, return-value explanation, failure-mode handling, and a compact parameter list. It is slightly long but every sentence earns its place, and the parameter list is scannable. The only minor issue is that the parameter explanations could be more compact, but overall it is appropriately sized for an 11-parameter tool.

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 (11 params, no output schema, no annotations), the description covers the essential context: what it returns, failure modes, and parameter semantics. It doesn't describe the exact format of the UI dump or how the screenshot is returned, but the description explicitly says the screenshot is 'an image you can see directly,' which is enough for an agent. The lack of an output schema is partially compensated by the return-value description, so this is solid but not perfect.

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 description coverage is 0%, so the description must compensate, and it does. It explains the meaning of package, activity, device, project_dir, reinstall, fresh, module/variant, release_locks/allow_uninstall, and scale in plain language, adding context beyond the bare schema titles. It doesn't give exact formats for device serial or project_dir, but the explanations are sufficient for an agent to invoke the tool correctly.

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 states a specific verb ('Start a driving session') and resource (Android app session), and clearly distinguishes it as 'the main entry point' from siblings like android_screenshot, android_ui_dump, android_build, and android_install. It also explains what the tool returns (screenshot + UI dump) and how it handles failure cases, making its purpose unmistakable.

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 'This is the main entry point,' which signals when to use it relative to siblings. It also explains that reinstall requires project_dir and that crash stack traces are mapped only when project_dir is provided. However, it does not explicitly state when NOT to use it or name alternative tools for specific sub-tasks (e.g., use android_screenshot for just a screenshot), so it falls short of a 5.

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