Set or remove a performance budget
set_budgetSet or remove a performance budget of a project (all URLs) or of one project URL (url_id, replaces the project budget for that URL). Metrics: total_kb, script_kb, image_kb, stylesheet_kb, font_kb, third_party_kb, third_party_count, request_count, perf_score (minimum), lab_lcp_ms, tbt_ms, lab_cls, fcp_ms, ttfb_ms, field_lcp_ms, field_inp_ms, field_cls, field_fcp_ms, field_ttfb_ms (field metrics mobile only). limit and goal as numbers in the metric unit (KB, ms, points, count, CLS) or as text with unit such as "1.5 MB" or "2.5 s". The goal is optional and never triggers alerts. ratchet=true lowers the limit one step toward the goal after every 30 days without a breach (needs a goal, never raises the limit, never passes the goal); ratchet_step is "round" (one rounding step, default) or a percentage from 1 to 50; ratchet=false switches it off. Pass ratchet without limit to change only this setting of an existing budget. Call with project_id only and list=true to read all budgets and the log of automatic reductions. Free.
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_id": "<project_id>"
},
"name": "set_budget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | ||
| list | No | return all budgets of the project instead of changing one | |
| limit | No | ||
| delete | No | ||
| device | No | default mobile | |
| metric | No | ||
| url_id | No | optional: URL budget instead of project budget | |
| ratchet | No | lower the limit step by step toward the goal (default off) | |
| project_id | Yes | ||
| ratchet_step | No | "round" or a percentage 1-50 |