web_vitals
Read Core Web Vitals for a project (POST /vitals). p75 is the headline: each metric is assessed at the 75th percentile of page loads, using nearest-rank. Web Vitals is a Pro read. A free account gets 403 PRO_REQUIRED, the same status and error code as POST /query, and that rejection is not metered. Each successful call counts as one metered read.
The event is fixed to page_view. On hosted, vitals are cwv_lcp, cwv_inp, cwv_cls, cwv_fcp, and cwv_ttfb properties on page_view. Collect them by installing the project snippet with data-track-vitals="true".
Thresholds follow web.dev (https://web.dev/articles/vitals) and PageSpeed Insights. LCP: good at or below 2500 ms, poor above 4000 ms. INP: good at or below 200 ms, poor above 500 ms. CLS: good at or below 0.1, poor above 0.25 (unitless). FCP: good at or below 1800 ms, poor above 3000 ms. TTFB: good at or below 800 ms, poor above 1800 ms. A value at or below good_max is good. A value above poor_min is poor. Any value in between is needs-improvement. The same rule rates every page load for the good, needs-improvement, and poor share, and rates the p75.
cwv_pass is true only when the LCP, INP, and CLS p75 ratings are all good. If INP n is 0, the decision uses LCP and CLS only. cwv_pass is null when LCP n is 0 or CLS n is 0. FCP and TTFB do not affect cwv_pass.
group_by is optional. device returns mobile, tablet, and desktop. path returns the top limit paths by sample size, sorted by worst LCP p75. Omit group_by for one site-wide row (group null). limit defaults to 10 and maxes at 20. days, date_from, and date_to select the window. Each metric row includes p75 with its unit, rating, n, skipped, the good/needs-improvement/poor share, and up to 5 top poor targets. FCP and TTFB targets are empty. skipped counts page views that did not report that vital. When the scan hits the 200,000 event cap, approximate is true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>"
},
"name": "web_vitals"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Lookback in days. Omit when date_from and date_to are set | |
| limit | No | Maximum rows. Defaults to 10 and maxes at 20 | |
| date_to | No | Inclusive end date (YYYY-MM-DD). Optional | |
| project | Yes | Project name or ID | |
| group_by | No | Split rows by device (mobile, tablet, desktop) or path. Omit for one site-wide row | |
| date_from | No | Inclusive start date (YYYY-MM-DD). Optional |