appium_context
List current Appium contexts or switch to a native or webview context for mobile automation.
Instructions
Manage Appium contexts with one tool. action=list returns all contexts and current context. action=switch changes to a target context.
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": {
"action": "<action>"
},
"name": "appium_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Use list to fetch contexts or switch to change context. | |
| context | No | Required when action is switch. Common values: NATIVE_APP or WEBVIEW_<id>/WEBVIEW_<package>. | |
| sessionId | No | Session ID; defaults to the active session. |