adb_logcat
Capture Android logcat snapshots with tag, priority, buffer, and grep filters to isolate relevant device logs for debugging.
Instructions
Capture a logcat snapshot. Supports tag filtering, priority levels, and grep patterns.
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": "adb_logcat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Filter by tag (e.g., 'ActivityManager' or 'MyApp') | |
| grep | No | Grep filter applied to output (literal string match, case-insensitive) | |
| lines | No | Number of recent lines to capture (1-10000) | |
| buffer | No | Logcat buffer to read from | main |
| device | No | Device serial | |
| priority | No | Minimum priority: V(erbose), D(ebug), I(nfo), W(arn), E(rror), F(atal) | |
| result_handle | No | Optional. If provided, store this tool's result under `result://<tool>/<name>` for retrieval after compaction. Name must be 1-32 chars, [a-zA-Z0-9_-]. Existing handles with the same tool+name are overwritten. Use adb_result_list to see active handles, adb_result_get or the MCP Resource URI to retrieve. | |
| result_handle_ttl | No | Optional. TTL in seconds for the result handle (60 to 604800). Default 43200 (12 hours). Ignored if result_handle is not provided. |