perf_trace
Records a DevTools performance trace in Chrome and returns Core Web Vitals conclusions—LCP phases, CLS, INP, long tasks—plus a JSON file for DevTools, not the raw trace.
Instructions
Record a DevTools performance trace and return its conclusions, never the trace: LCP with its phases (TTFB, resource load delay and duration, render delay), FCP, CLS (session windows), INP, the document request, render-blocking resources, long tasks with the function responsible, long animation frames. The raw trace goes to a JSON file (path and size in the result) that DevTools > Performance can load. action record (default) = start, reload unless reload: false, optional action, wait duration_ms, stop. start/stop bracket anything else done meanwhile. Uses chrome.debugger: Chrome shows its debugging bar while tracing; in launch mode nobody sees it. Refuses on a hidden page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | record does start → wait → stop in one call | record |
| reload | No | Reload the page right after tracing starts (default true for record, false for start) | |
| tab_id | No | Target tab; omitted = last tab navigated in this session, else the active one | |
| save_to | No | Absolute path: write the trace JSON there and return the path instead of the content | |
| duration_ms | No | record: how long to trace, max 60000 | |
| interaction | No | Action run right after recording starts |