Skip to main content
Glama
rahulkr
by rahulkr

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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'}"
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without behavioral context. It doesn't disclose permissions needed, whether this requires physical device access, side effects on other connectivity features, confirmation requirements, or error conditions. 'Enable or disable' implies mutation but lacks safety/impact details.

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, efficient sentence with zero wasted words. It's appropriately sized for a simple toggle operation and front-loads the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a device control tool with 2 parameters, 0% schema coverage, no annotations, but with an output schema, the description is insufficient. It doesn't explain parameter usage, device targeting logic, behavioral implications, or error handling. The output schema helps but doesn't compensate for the missing operational context.

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 schema provides no parameter documentation. The description mentions 'enable or disable' which hints at the boolean 'enable' parameter purpose, but doesn't explain the device_serial parameter at all. It adds minimal semantic value beyond what's inferable from parameter names.

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 'Enable or disable airplane mode' clearly states the verb (enable/disable) and resource (airplane mode), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like toggle_wifi or toggle_talkback beyond naming the specific feature.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. It doesn't mention device selection logic (when device_serial is needed) or relationship to other connectivity tools like toggle_wifi.

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

Install Server

Other Tools

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