change_screen_size
Adjust Android device screen resolution to test different display sizes for UI development and visual QA workflows.
Instructions
Change screen resolution - useful for testing different screen sizes
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"width": "<width>",
"height": "<height>"
},
"name": "change_screen_size"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| height | Yes | ||
| device_serial | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/adb_mcp_server/server.py:931-934 (handler)The main handler function for the 'change_screen_size' tool. It changes the Android device's screen resolution using the ADB 'wm size' command. The function is automatically registered as an MCP tool via the @mcp.tool() decorator.
@mcp.tool() def change_screen_size(width: int, height: int, device_serial: str | None = None) -> str: """Change screen resolution - useful for testing different screen sizes""" return run_adb(["shell", "wm", "size", f"{width}x{height}"], device_serial)