Skip to main content
Glama

perf_check

Read-only

Compares a recorded GPU run against a saved baseline to flag FPS, GPU time, encoder, or command-buffer regressions or improvements and returns full comparison details.

Instructions

Judges a recording against a reference saved with perf_baseline: regressed when FPS falls under the reference's lowest FPS by more than margin_pct, GPU ms per frame rises over its highest by more than margin_pct, or encoders or command buffers per frame exceed its highest; improved when a number leaves the range the other way and none regressed; same otherwise. Frame pacing, short encoders and GPU idle time are reported by the comparison but do not decide: they vary too much between equal runs. A run from Windows against a Metal reference (or the reverse) is judged on FPS alone. A reference saved with skip_s judges the run without its first skip_s seconds too (skipped_s says so). Returns the reasons and perf_compare's full comparison against the reference's first run.

Input Schema

NameRequiredDescriptionDefault
runYesa run name from perf_runs
baselineYesa reference name from perf_baseline
margin_pctNohow far outside the reference's range FPS or GPU ms per frame may fall before counting, default 3

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  2. Addedv0.7.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes far beyond by disclosing the exact verdict logic, that frame pacing, short encoders and GPU idle time are reported but never decide, that cross-OS comparisons fall back to FPS alone, and that a skip_s reference trims the run's first skip_s seconds (reported as skipped_s). It also says what is returned: the reasons plus perf_compare's full comparison against the reference's first run.

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?

The purpose is front-loaded in the first clause and the rules follow in a logical order, with the caveats (non-deciding metrics, cross-OS, skip_s) after the core logic. It is a dense single block of prose, but each sentence carries distinct behavioral information rather than restating the schema.

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?

An output schema exists, so return values need no further explanation, and the description still names the shape of the verdict and returned reasons. For a tool that compares recordings across platforms and time windows, the description covers the decision rules, the exceptions, and the baseline prerequisite without gaps.

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

Parameters3/5

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

Schema coverage is 100%, so both required params and margin_pct are already documented in the schema. The description adds real meaning for margin_pct by explaining it applies to both the FPS floor and the GPU-ms-per-frame ceiling, but it adds nothing for run or baseline beyond what the schema already says.

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

Purpose5/5

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

States a specific verb and resource: 'Judges a recording against a reference saved with perf_baseline', then enumerates the exact decision rules (FPS under the reference's lowest by more than margin_pct, GPU ms per frame over its highest, encoder/command-buffer counts). It also distinguishes itself from perf_baseline (which saves the reference) and from perf_compare (whose full comparison it returns).

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?

Makes clear the prerequisite (a reference created by perf_baseline) and the conditions under which a run is judged regressed, improved, or same, including the cross-platform Windows/Metal special case. What it does not do is explicitly route the agent away from perf_compare or perf_gate when a raw comparison or a pass/fail gate is wanted, leaving that inference to the sibling names.

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