toggle_show_layout_bounds
Enable or disable layout bounds display on Android devices to debug UI element positioning and sizing during development.
Instructions
Show layout bounds for all views - great for debugging layouts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enable | Yes | ||
| device_serial | No |
Implementation Reference
- src/adb_mcp_server/server.py:881-887 (handler)Handler function that toggles layout bounds visibility by setting the debug.layout property using ADB shell setprop. Registered as an MCP tool via @mcp.tool() decorator.@mcp.tool() def toggle_show_layout_bounds(enable: bool, device_serial: str | None = None) -> str: """Show layout bounds for all views - great for debugging layouts""" value = "true" if enable else "false" return run_adb([ "shell", "setprop", "debug.layout", value ], device_serial)