Skip to main content
Glama

android_wait_activity

Read-onlyIdempotent

Wait for a specified Android package to be the active foreground activity, optionally matching a window class, within a configurable timeout.

Instructions

Wait for an exact foreground package and optional window class.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutMsNo
packageNameYes
windowClassNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive, so the safety profile is covered. The description adds the useful detail that matching is exact and that the window class is optional, but it does not disclose timeout behavior or what happens when the condition is not met.

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 sentence, front-loaded with the primary action and target, and contains no filler or redundancy. It is appropriately concise for a simple wait operation.

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?

The description is adequate for selecting the tool, but with no output schema it does not explain whether the call returns success/failure or how timeout is signaled. The timeoutMs schema default and bounds provide some context, but the behavior on timeout or non-matching foreground state is left implicit.

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 0%, so the description carries the burden of explaining parameters. It clarifies that packageName is the exact foreground package and that windowClass is optional, but it does not mention timeoutMs or how the timeout parameter affects the wait. This is partial but not full compensation for the missing schema descriptions.

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 uses a specific verb ('Wait') and names the target resource: an exact foreground package with an optional window class. It clearly states what the tool does, though it does not explicitly distinguish itself from sibling waiting tools like android_wait_idle or android_wait_change.

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 implies its use case—waiting for a specific foreground package/window—but provides no explicit guidance on when to choose this tool over alternatives such as android_wait_idle or android_ui_wait_for. The agent must infer the appropriate context from the tool name and description alone.

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