Skip to main content
Glama

PerfDelta

Set or remove a performance budget

set_budget
DestructiveIdempotent

Set 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

NameRequiredDescriptionDefault
goalNo
listNoreturn all budgets of the project instead of changing one
limitNo
deleteNo
deviceNodefault mobile
metricNo
url_idNooptional: URL budget instead of project budget
ratchetNolower the limit step by step toward the goal (default off)
project_idYes
ratchet_stepNo"round" or a percentage 1-50

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety bar is partly covered; the description adds real value on top by disclosing that a URL budget 'replaces the project budget for that URL', that goals 'never trigger alerts', the 30-day ratchet cycle and its never-raise/never-pass invariants, and that the call is 'Free'. It does not explain what delete=true destroys (e.g., whether the URL budget or the whole budget is removed).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every clause carries information, but the entire definition is one dense run-on paragraph with the 18-value metric list and unit rules crammed inline. Front-loading is good, yet the lack of any list or line structure makes the ratchet and unit rules hard to scan for an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter mutation tool with no output schema, the description covers the mutation semantics, metric vocabulary, unit handling, and the ratchet state machine. The remaining gaps (delete behavior, device dimension's effect on which metrics apply) are modest but real.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 50% schema coverage across 10 params, the description compensates well: it enumerates all valid metric values, specifies limit/goal formats (KB, ms, points, count, CLS, or text like "1.5 MB"), explains ratchet and ratchet_step ("round" or 1-50 percent), and notes field metrics are mobile-only. The 'device' parameter (default mobile) and 'delete' semantics are left undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair (set/remove) and resource (performance budget), plus the two scopes it operates on (project-wide vs. a single url_id) and the read mode via list=true. A sibling get_budget_status exists but is never mentioned, so an agent gets an exact purpose without guidance on how this differs from the status tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete routing rules: project_id alone vs. url_id for a URL budget, list=true with project_id only to read all budgets, and 'Pass ratchet without limit to change only this setting of an existing budget.' It does not state when to prefer get_budget_status over this tool, and 'delete' is never explicitly named as the removal path.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources