Skip to main content
Glama
rahulkr
by rahulkr

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

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

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

No annotations are provided, so the description carries full burden. It states the tool shows layout bounds for debugging, implying a read-only or diagnostic operation, but doesn't disclose behavioral traits like whether it requires specific permissions (e.g., accessibility services), affects app performance, has side effects (e.g., visual overlays), or how results are returned (though output schema exists). The description adds some context but lacks critical details for a tool that likely interacts with device UI.

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: 'Show layout bounds for all views - great for debugging layouts'. It's front-loaded with the core purpose and adds a brief context clause. There's no wasted verbiage, making it appropriately concise for a tool with two parameters.

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

Completeness3/5

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

Given the tool's moderate complexity (UI debugging with 2 parameters), no annotations, and an output schema (which handles return values), the description is incomplete. It states the purpose but lacks usage guidelines, parameter explanations, and behavioral details (e.g., how it interacts with devices). The output schema mitigates some gaps, but overall, the description doesn't provide enough context for effective use.

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 descriptions. The tool description doesn't mention any parameters, leaving both 'enable' (boolean) and 'device_serial' (optional string) undocumented in terms of purpose or usage. Since no parameter info is provided in the description, it fails to compensate for the low schema coverage, resulting in a baseline score.

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 clearly states the tool's purpose: 'Show layout bounds for all views - great for debugging layouts'. It specifies the action ('show layout bounds'), target ('all views'), and context ('debugging layouts'), which is more specific than just restating the name. However, it doesn't explicitly differentiate from sibling tools like 'get_ui_hierarchy' or 'get_accessibility_info' that might also help with layout debugging.

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 minimal guidance: it mentions 'great for debugging layouts', which implies a use case but doesn't specify when to use this tool versus alternatives like 'get_ui_hierarchy' for inspecting layout structure or 'screenshot' for visual debugging. No explicit when-not-to-use scenarios or prerequisites (e.g., device connection) are mentioned.

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