get_frame_stats
Analyze frame rendering performance to identify jank in Android applications. Use this tool to detect UI stutters and optimize app smoothness during development and testing.
Instructions
Get frame rendering stats for an app - useful for detecting jank
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": {
"package_name": "<package_name>"
},
"name": "get_frame_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package_name | Yes | ||
| device_serial | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/adb_mcp_server/server.py:808-812 (handler)The get_frame_stats tool handler function, registered via @mcp.tool() decorator. It retrieves frame rendering statistics for the specified Android package by executing the ADB command 'dumpsys gfxinfo <package_name> framestats'. This helps detect jank and performance issues in app rendering.
@mcp.tool() def get_frame_stats(package_name: str, device_serial: str | None = None) -> str: """Get frame rendering stats for an app - useful for detecting jank""" return run_adb(["shell", "dumpsys", "gfxinfo", package_name, "framestats"], device_serial)