clear_logcat
Clear Android device logcat buffers to remove old logs and start fresh debugging sessions. Use this tool to maintain clean logs for development, testing, and troubleshooting workflows.
Instructions
Clear the logcat buffer
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_serial | No |
Implementation Reference
- src/adb_mcp_server/server.py:718-722 (handler)The handler function for the clear_logcat tool, registered via the @mcp.tool() decorator. It executes 'adb shell logcat -c' to clear the logcat buffer on the specified device.@mcp.tool() def clear_logcat(device_serial: str | None = None) -> str: """Clear the logcat buffer""" return run_adb(["shell", "logcat", "-c"], device_serial)