metro_logs
Reads console logs from a React Native app via Metro CDP debugger. Auto-discovers the debugger URL or accepts a given one. Optionally saves logs to a file for bug evidence.
Instructions
Reads console logs from a React Native app via the Metro CDP debugger. If webSocketDebuggerUrl is omitted, auto-discovers via metro_apps and uses the first connected app. Reports which app was chosen. Pass saveTo to also write the console timeline to a file for evidence (e.g. attach to a bug).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| webSocketDebuggerUrl | No | CDP WebSocket URL from metro_apps. Omit to auto-discover. | |
| port | No | Metro port for auto-discovery (default 8081) | |
| durationMs | No | How long to collect logs in milliseconds (default 3000) | |
| maxLogs | No | Maximum number of log entries to return (default 100, keeps most recent) | |
| saveTo | No | Optional file path; writes the console timeline (one line per entry: [level ts] text) for evidence. |