get_anr_traces
Retrieve ANR traces to diagnose Application Not Responding issues on Android devices for debugging and performance analysis.
Instructions
Get ANR (Application Not Responding) traces
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_anr_traces"
}
}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:764-768 (handler)The main handler function for the 'get_anr_traces' tool. It is registered via the @mcp.tool() decorator and implements the logic by executing an ADB shell command to read the ANR traces file (/data/anr/traces.txt) using the run_adb utility function.
@mcp.tool() def get_anr_traces(device_serial: str | None = None) -> str: """Get ANR (Application Not Responding) traces""" return run_adb(["shell", "cat", "/data/anr/traces.txt"], device_serial)