Skip to content

cdp_metro_events

Read Metro reporter events (bundle_build_started, bundle_build_done, bundle_build_failed, reloads) captured since the MCP connected. The MetroEventsClient attaches a second WebSocket alongside CDP, giving push-based visibility into bundler state — watch for build errors without having to read console.error. Returns { eventsConnected, lastBuild, buildErrors, events, count }. Pass clearErrors: true to reset the build-error counter.

NameTypeRequiredDefaultConstraintsDescription
limitnumberNo20min: 1, max: 100, integerMax entries to return (default 20, max 100)
typestringNoFilter by event type (e.g. “bundle_build_failed”)
clearErrorsbooleanNofalseReset the build-error counter without reading events
cdp_metro_events()