adb_logcat
Capture Android logcat snapshots with filtering by tag, priority, and grep pattern for efficient debugging.
Instructions
Capture a logcat snapshot. Supports tag filtering, priority levels, and grep patterns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | Number of recent lines to capture (1-10000) | |
| tag | No | Filter by tag (e.g., 'ActivityManager' or 'MyApp') | |
| priority | No | Minimum priority: V(erbose), D(ebug), I(nfo), W(arn), E(rror), F(atal) | |
| grep | No | Grep filter applied to output (literal string match, case-insensitive) | |
| device | No | Device serial | |
| buffer | No | Logcat buffer to read from | main |
| 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. |