Skip to main content
Glama

Check a run against budgets

perf_gate
Read-only

Checks a recorded run against performance budgets such as FPS floors, stutter rate, p95 GPU ms, hitches and peak Metal memory, then reports whether each limit held.

Instructions

Checks a recording against budgets and says pass or fail: FPS and 1% low floors, ceilings for stutter rate, p95 GPU ms per frame, hitches and peak Metal MiB. Give at least one. A number the recording lacks fails its budget (value null), and so does a run that stopped presenting (unpresented). Returns each budget with its limit, value and whether it held.

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": {
      "run": "<run>"
    },
    "name": "perf_gate"
  }
}

Input Schema

NameRequiredDescriptionDefault
runYesa run name from perf_runs
fieldsNoresult paths to keep, dotted: common.frame_pacing
skip_sNoseconds to leave out at the start (shaders compile, resources load), default 0; GPU numbers, hitches and Metal memory are recomputed without them
fps_minNothe FPS must be at least this
hitches_maxNothe number of hitches at most this
metal_mib_maxNothe peak Metal memory in MiB at most this
gpu_ms_p95_maxNothe p95 GPU ms per frame at most this
fps_1pct_low_minNothe 1% low FPS must be at least this
stutter_rate_pct_maxNothe share of stutter frames, in %, at most this

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.28.0
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "result paths to keep, dotted: common.frame_pacing",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / skip_s / description
      Previous value: -"seconds to leave out at the start of each recording, where shaders compile and resources load; 0 (default) keeps all. The GPU numbers, hitches and Metal memory are recomputed without them"New value: +"seconds to leave out at the start (shaders compile, resources load), default 0; GPU numbers, hitches and Metal memory are recomputed without them"
  2. Addedv0.18.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description goes further by disclosing the failure semantics that annotations cannot: a missing metric yields a null value and fails its budget, and a run that stopped presenting is also a failure. That is exactly the kind of non-obvious evaluation rule an agent needs before trusting a pass/fail result.

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

Conciseness4/5

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

Three tight sentences, front-loaded with the verdict behavior before the budget list and the failure edge cases. The final sentence describing the return shape ('each budget with its limit, value and whether it held') is partly redundant given an output schema exists, which is the only wasted content.

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

Completeness5/5

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

For a read-only evaluation tool with a full schema, an output schema, and explicit annotations, the description covers what remains: the precondition of at least one budget, how missing data and unpresented runs are scored, and the granularity of the result. An agent can call this correctly without further inference.

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?

Schema coverage is 100%, so per-parameter meanings are already handled, and baseline would be 3. The description earns an extra point by adding a cross-parameter validation rule not expressible in the schema — at least one budget threshold must be supplied — plus the interaction rule that absent metrics are treated as failures rather than skipped.

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 and resource ('Checks a recording against budgets and says pass or fail') and enumerates the exact budget dimensions it evaluates (FPS floors, stutter rate, p95 GPU ms, hitches, peak Metal MiB). The purpose is unambiguous, but nothing in the text distinguishes it from the sibling perf_check or perf_ab, leaving the agent to infer the division of labor.

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

Usage Guidelines3/5

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

'Give at least one' establishes a hard precondition for calling the tool, which is genuine usage guidance. Beyond that, there is no statement of when to reach for this versus perf_check, perf_ab, or perf_baseline, and no exclusions — the agent must guess from names alone.

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