Performance trace
perf_traceRecords a DevTools-style performance trace, saves the JSON, and analyzes long tasks, blocking time, LCP, CLS, and slow scripts to diagnose page performance.
Instructions
Records a performance trace like the DevTools Performance panel (optionally reloading the page first), saves the .json trace (open it in DevTools > Performance) and returns an analysis: long tasks, total blocking time, main-thread breakdown, render-blocking requests, LCP, CLS and the slowest scripts. Use action "start"/"stop" for manual recording or "run" to record for durationMs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Tab to act on. Defaults to the session target tab (see tab_select). | |
| action | No | Recording mode (default run). | |
| reload | No | Reload the page when recording starts (default true for run). | |
| savePath | No | Absolute file path to save to. Defaults to a file in the kyte-webmcp output folder. | |
| cpuProfile | No | Include JavaScript CPU samples for the flame chart (default true). | |
| durationMs | No | How long to record for action run (default 5000, or until load + 3 s when reloading). |