Skip to main content

app_contexts

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

List the automatable contexts on the device: the native shell plus any debuggable WebViews. A hybrid app's web content is only reachable after switching into its context with app_context.

Read-only: readOnlyHint is true.

Arguments​

NameTypeRequiredWhat it is
devicestringDevice serial to target, e.g. "emulator-5554". Omit when only one device is running.
driverstring: uiautomator2, uiautomator, wdaDriver to use: "uiautomator2" (default for Android; fast, installs a server APK on first use), "uiautomator" (Android, installs nothing, slower, cannot type), or "wda" (WebDriverAgent: iOS simulators and iPhones).

Examples​

Each is the arguments of a tools/call request; the first is shown whole.

List the native app and its WebViews​

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_contexts",
"arguments": {}
}
}

On an Android 15 emulator the answer's text was:

NATIVE_APP (current)
WEBVIEW_dev.mobium.mobiumapp — about:blank about:blank

mobium contexts on an Android 15 emulator

mobium contexts on an Android 15 emulator