Skip to main content
Glama
rahulkr
by rahulkr

change_density

Adjust Android device screen density (DPI) to test app layouts and UI responsiveness across different display configurations.

Instructions

Change screen density - useful for testing different DPI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dpiYes
device_serialNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'change_density' tool. It uses the run_adb utility to execute the ADB shell command 'wm density [dpi]' which changes the screen density (DPI) on the Android device, useful for testing different screen densities.
    @mcp.tool()
    def change_density(dpi: int, device_serial: str | None = None) -> str:
        """Change screen density - useful for testing different DPI"""
        return run_adb(["shell", "wm", "density", str(dpi)], 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. It mentions the tool changes screen density for testing, implying a mutation operation, but doesn't specify whether this requires device permissions, if changes persist across reboots, potential side effects, or what the output contains. For a mutation tool with zero annotation coverage, this is insufficient behavioral context.

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 extremely concise with just two clauses, front-loading the core purpose ('Change screen density') followed by a brief usage context. Every word earns its place with zero redundant information, making it efficient for quick comprehension.

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 this is a mutation tool with 2 parameters (1 required), 0% schema coverage, no annotations, but with an output schema present, the description provides basic purpose but lacks crucial context about parameter usage, behavioral implications, and relationship to sibling tools. The output schema existence means return values don't need description, but other gaps remain significant.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. The description mentions 'DPI' which maps to the 'dpi' parameter, but doesn't explain valid ranges, units, or typical values. It completely ignores the 'device_serial' parameter and its optional nature. The description adds minimal value beyond what's inferable from parameter names alone.

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 as 'Change screen density' with the specific verb 'Change' and resource 'screen density', and adds context about being 'useful for testing different DPI'. It distinguishes from sibling tools like 'reset_density' and 'change_screen_size' by focusing specifically on density/DPI changes rather than resetting or changing screen dimensions.

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 with 'useful for testing different DPI', which implies a testing context but doesn't specify when to use this tool versus alternatives like 'reset_density' or 'change_screen_size'. No explicit when/when-not guidance or prerequisites are mentioned, leaving the agent to infer usage scenarios.

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