toggle_wifi
Control WiFi connectivity on Android devices for testing, development, or troubleshooting scenarios. Turn WiFi on or off to manage network conditions during app testing, debugging, or device configuration workflows.
Instructions
Enable or disable WiFi
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enable | Yes | ||
| device_serial | No |
Implementation Reference
- src/adb_mcp_server/server.py:837-841 (handler)The toggle_wifi tool handler, decorated with @mcp.tool() for registration. Executes ADB shell command to enable or disable WiFi on the Android device.@mcp.tool() def toggle_wifi(enable: bool, device_serial: str | None = None) -> str: """Enable or disable WiFi""" state = "enable" if enable else "disable" return run_adb(["shell", "svc", "wifi", state], device_serial)