Skip to main content
Glama

Start an activity

start_activity

Launch an Android activity on a device using a component name or intent action. Blocks until the activity is displayed when wait is enabled.

Instructions

Launch an activity on one device (am start) either by component ("com.example/.MainActivity") or by intent action ("android.intent.action.VIEW" with optional data/extras). Use wait: true to block until the activity is reported as displayed.

Input Schema

NameRequiredDescriptionDefault
dataNoIntent data URI (-d), e.g. "https://example.com/item/1".
waitNoPass -W and wait for launch to complete (default false).
actionNoIntent action, e.g. "android.intent.action.VIEW". Mutually exclusive with component.
deviceNoDevice serial from list_devices; optional when exactly one device is connected.
extrasNoRaw `am start` arguments appended as-is and shell-quoted, e.g. ["--es", "message", "hello world", "--ez", "debug", "true"].
packageNoRestrict the intent to a package (-p), e.g. "com.example.app".
componentNoExplicit component "package/activity". Mutually exclusive with action.
timeout_msNoTimeout in milliseconds (default 30000; raise it when wait is true).
force_stop_firstNoPass -S to force-stop the target app before starting it (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare this is a non-readOnly, non-idempotent, non-destructive operation, so the mutate-but-not-destroy profile is already covered. The description adds genuinely useful behavior beyond that: the wait: true flag blocks until the activity is *reported as displayed*, and the launch targets a single device. It omits what happens on failure or when the component doesn't exist.

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, front-loaded with the core action and mechanism, then the blocking caveat. No filler, and the most important disambiguation (component vs action) comes first.

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?

With no output schema and a fully documented schema, the description covers what an agent needs to call the tool, including the blocking semantics of wait. It leaves gaps on error behavior and on when device must be specified versus inferred, but nothing that would cause a wrong invocation.

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 the schema already documents all nine parameters in detail, including the data/extras syntax and mutual exclusivity. The description reinforces component-vs-action exclusivity but adds no format or constraint detail the schema lacks, so the baseline 3 applies.

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 names a specific verb (Launch), the resource (an activity), the underlying mechanism (`am start`), and the two mutually exclusive invocation modes. It is clearly distinguishable from the nearby launch_package sibling.

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 tells the agent how to choose between component and action modes and when to set wait: true, which is real usage guidance. It stops short of naming alternatives such as launch_package or explaining when to prefer one over the other, and gives no exclusions or failure conditions.

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