Skip to content

Session Replay Tools ​

11 tools for recording, analyzing, and debugging user sessions. Registered after calling connect.

replay_start ​

Start recording a session. Captures DOM mutations (via rrweb), network requests, console messages, and errors.

Returns: Session ID for use with other replay tools.

replay_stop ​

Stop the current recording.

Returns: Session summary with event counts (DOM events, network requests, console messages, errors).

replay_capture_error ​

Start recording and block until a JavaScript error fires.

Returns: Failure bundle with the error, surrounding DOM state, network requests, and console output. Useful for reproducing intermittent errors.

replay_get_bundle ​

Get the failure bundle from a recording.

Returns:

  • JavaScript errors captured
  • Failed network requests
  • Console errors
  • Component state snapshot (if a framework was detected)
  • Screenshot at time of error

replay_export_html ​

Export a recording as a self-contained, shareable HTML file.

ParameterTypeDefaultDescription
outputPathstringauto-generatedOutput file path (confined to project root)

Returns: Path to the HTML file containing:

  • rrweb player for DOM replay
  • Network request waterfall
  • Console log viewer
  • Error list

replay_compare ​

Diff two recorded sessions.

ParameterTypeDefaultDescription
sessionAstringrequiredFirst session ID
sessionBstringrequiredSecond session ID

Returns: Differences in network requests, console messages, errors, and session duration.

replay_network_cause ​

Trace JavaScript errors back to their probable network causes.

ParameterTypeDefaultDescription
sessionIdstring—Session to analyze (latest if omitted)

Returns: Causal chains linking errors to failed or slow network requests. For example: POST /api/save → 500 caused TypeError: Cannot read property 'id' of undefined.

replay_bisect ​

Binary-search git commits to find which one introduced a visual regression.

ParameterTypeDefaultDescription
goodCommitstringrequiredKnown-good commit hash
badCommitstringrequiredKnown-bad commit hash
pageUrlstringrequiredPage to screenshot
devServerCmdstringrequiredCommand to start dev server
devServerUrlstringrequiredURL to wait for
thresholdnumber0.1Pixel diff threshold
waitSelectorstring—Wait for this selector before screenshot
screenshotDelaynumber—Additional delay in ms

How it works: Checks out each commit via git bisect, starts the dev server, captures a screenshot, compares it, and narrows down to the exact commit that introduced the regression.

Returns: The regression-introducing commit hash, diff images for each step.

replay_persist ​

Save a recording to disk as JSON.

ParameterTypeDefaultDescription
sessionIdstring—Session to save (latest if omitted)

Returns: File path and size.

replay_load ​

Load a persisted recording from disk back into memory.

ParameterTypeDefaultDescription
sessionIdstringrequiredSession ID to load

Restores the recording into the session store for further analysis with other replay tools.

replay_list ​

List all sessions — both persisted on disk and currently in memory.

Returns:

json
{
  "persisted": [{ "id": "...", "path": "...", "size": "..." }],
  "inMemory": [{ "id": "...", "eventCount": 123, "duration": "45s" }]
}

Released under the MIT License.