get_cpu_info
Retrieve CPU usage data from Android devices to monitor performance and identify resource bottlenecks during development and testing.
Instructions
Get CPU usage information
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_cpu_info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_serial | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/adb_mcp_server/server.py:782-786 (handler)The main handler function for the 'get_cpu_info' tool. It executes 'adb shell top -n 1 -b' to retrieve CPU usage information for the specified device. The @mcp.tool() decorator also serves as the registration mechanism in FastMCP.
@mcp.tool() def get_cpu_info(device_serial: str | None = None) -> str: """Get CPU usage information""" return run_adb(["shell", "top", "-n", "1", "-b"], device_serial)