Skip to main content
Glama

perf

Measures an open page's frame time, FPS, draw calls, triangles and asset size against a budget, then tests variants to identify what causes stutter or over-budget frames.

Instructions

Measures the open page's frame time (fps), draw calls, triangles and asset size against a budget (desktop by default): it is for a frame a reply reports over budget, or a user who asks about performance (stutter, low fps). To find what costs the frame, give variants: each is measured on a fresh page against the baseline, in this one call, with named objects hidden, a pixel ratio, code run with renderer and scene (shadows or antialias off, a material swapped), or a query the page loads with ("noshadow&pr=0.5", for switches the game reads at load); no reopening or reload code needed. Sampling waits until no element covers the canvas (a loading screen), up to 5 s of the page running, and the load line says what it waited for or sampled under.

Input Schema

NameRequiredDescriptionDefault
gameNoThe name the game was opened under with the `open` tool, to act on ("main" by default; a subagent uses its own).
costsNoAlso list the main scene's visible content by named group (an object goes by its nearest named ancestor, as `look` names it): triangles, those casting shadows, draw calls and texture MB, the 12 groups with the most triangles and the rest in one line. Counted, not timed, with no frustum culling; `variants` with `hide` times a group.
budgetNodesktop, mobile, quest, site (a 3D website: first scene frame within 3 s on fast-4g unless `network` says otherwise, 1 MB of script, 4 MB of assets), or limits to override: { frameMs, assetMB, triangles, drawCalls, textureMax, pixelRatioMax, firstSceneFrameMs, scriptMB }.
networkNoAlso time a first visit on this network (Chrome DevTools' presets), in real time with no cache: when the first scene frame came, which bytes came before it by kind (as sent: the harness's own server does not compress, a CDN does) and when an overlay over the canvas went. CPU `throttle` is separate.
throttleNoSlow the page's JavaScript this many times, as on a weak laptop (4 is a typical one); GPU work is not slowed.
variantsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly does: it discloses that sampling waits up to 5 s for a covering element (loading screen) to clear, that variants run on a fresh page against the baseline within the same call, and that the load line reports what was waited for. It does not say what a failed/throttled sample returns or how a budget breach is signalled in the response.

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?

Purpose is front-loaded, which is right, but the body is a run-on block with stacked parentheticals and colons — the `variants` explanation alone is one ~80-word sentence with five parallel clauses. The content mostly earns its place, yet readability suffers; a short bulleted breakdown of variant knobs would preserve the information at much lower parsing cost.

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 6-parameter, zero-annotation, no-output-schema tool, the description covers the hard parts: what is measured, the budget model, variant isolation, sampling preconditions, and network emulation semantics. The remaining gap is the return shape — the agent is told only that a "load line" reports what was waited for, without knowing what the overall reply contains.

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 already 83%, so baseline is 3; the description nonetheless adds real meaning to the least-documented parameter, `variants` — fresh page per variant, baseline comparison, `code` receiving `renderer` and `scene`, and `query` being read at page load with the concrete example "noshadow&pr=0.5". It also clarifies that `throttle` is CPU-only and separate from `network`'s DevTools presets, which the schema does not say.

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?

Opens with a specific verb and an explicit list of measurements (frame time/fps, draw calls, triangles, asset size) plus the budget framing with the desktop default. It does not name a sibling tool it is not, but it does implicitly distinguish itself from `look` by referencing how `look` names groups. An agent can tell what it does without opening the schema.

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?

"it is for a frame a reply reports over budget, or a user who asks about performance (stutter, low fps)" gives a concrete trigger condition with user-facing symptoms. It also routes within-tool: use `variants` "to find what costs the frame", and `costs` is described in the schema as the counted counterpart. No explicit exclusions versus siblings like `optimize` or `test` are stated.

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