adb_logcat
Snapshot a connected Android device's logcat buffer. Returns recent lines with optional filters to reduce noise before raising the line count.
Instructions
Dump the device's current logcat buffer and return its most recent lines - a snapshot, not a live stream, and it doesn't clear the buffer. Only reads. Returns { lineCount, truncatedFrom, lines } where lines is an array of raw log lines, lineCount is how many are returned, and truncatedFrom is the total lines in the dump before trimming. Use filter to cut noise (e.g. one app's tag) before raising lines. Requires adb on PATH and an authorized device.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | How many of the most recent lines to return. Default 200. | |
| filter | No | Space-separated logcat filterspecs, e.g. "MyTag:D *:S" shows only MyTag at debug level and above and silences everything else. Omit for the whole buffer. | |
| workspace | No | Workspace name (not id). Created if it doesn't exist, and this call is recorded as a job in its history. Defaults to "default". | |
| deviceSerial | No | Device serial from adb_devices, e.g. "emulator-5554" or "R58M123ABC". Only needed when more than one device is connected; omit otherwise. |