Skip to main content
Glama
rahulkr
by rahulkr

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
NameRequiredDescriptionDefault
enableYes
device_serialNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • 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)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Enable or disable WiFi' implies a system-level mutation operation, but it doesn't disclose permission requirements, whether changes are reversible, potential side effects, or interaction with other connectivity tools. This is inadequate for a mutation tool with zero annotation coverage.

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 perfectly concise at just three words, front-loading the core functionality with zero wasted text. Every word earns its place in communicating the essential purpose.

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 system mutation tool with no annotations, 2 parameters, and an output schema (which helps), the description is insufficient. It should address behavioral aspects like permissions, side effects, or relationship to other connectivity controls, given the tool's potential impact on device state.

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?

The description doesn't mention any parameters, while the schema has 2 parameters with 0% description coverage. However, the parameter names ('enable' and 'device_serial') are self-explanatory enough that the baseline score of 3 is appropriate, as the description doesn't need to compensate heavily for the schema gap.

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 WiFi' clearly states the tool's function with a specific verb ('enable or disable') and resource ('WiFi'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'toggle_airplane_mode' or 'toggle_talkback' beyond the WiFi focus.

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 lacks any mention of when this operation is appropriate or how it relates to other device control tools in the sibling list.

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