Skip to main content
Glama

toggle_airplane_mode

Enable or disable airplane mode on Android devices to manage network connectivity during development, testing, and debugging workflows.

Instructions

Enable or disable airplane mode

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enableYes
device_serialNo

Implementation Reference

  • The handler function for toggle_airplane_mode tool, decorated with @mcp.tool() for automatic registration in MCP. Executes ADB commands to set airplane_mode_on global setting and broadcasts the AIRPLANE_MODE intent.
    @mcp.tool() def toggle_airplane_mode(enable: bool, device_serial: str | None = None) -> str: """Enable or disable airplane mode""" value = "1" if enable else "0" run_adb(["shell", "settings", "put", "global", "airplane_mode_on", value], device_serial) # Broadcast the change intent = "android.intent.action.AIRPLANE_MODE" run_adb(["shell", "am", "broadcast", "-a", intent], device_serial) return f"Airplane mode {'enabled' if enable else 'disabled'}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rahulkr/r_adb_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server