Skip to main content
Glama

Measure a scene's frame times

godot_perf

Runs a Godot scene headless and measures frame-time p50/p95/p99, physics steps and slow frames against a budget, then flags regressions from the last run to verify performance changes.

Instructions

Run a scene in Godot 4.7 headless and measure it the way a player feels it: frame-time p50, p95, p99 and max against a budget (default 16.6 ms), the physics step apart from the rest of the frame, the slowest frames with what changed on them (nodes made or freed in one frame, a heavy physics step, script work), node and orphan counts, and the change since the last run of the same scene (kept in .godot/godotwright/perf/). Headless measures the CPU side (scripts, physics, scene work), not the GPU. input plays a timeline as godot_play does, to measure while something happens. An error result when p95 is over budget or more than 10% worse than last time. Lessons that fit the numbers are named. Measure before and after every performance change.

Input Schema

NameRequiredDescriptionDefault
pathNoThe project folder, or any file or folder inside it (Godotwright walks up to project.godot). Relative paths start at the server's folder. Default: the current project.
inputNoinput while measuring: "10 hold right 300"
sceneNothe res:// scene to measure (default: the main scene)
framesNoframes to measure (default 600)
warmupNoframes to run first without measuring (default 60)
baselineNocompare with and save the last run of this scene (default true)
budget_msNoframe budget in ms (default 16.6)
timeout_secondsNotimeout of the run (default 300)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.2

TDQS

A4.6/5.0
Behavior5/5

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

Discloses a hard limitation (headless measures CPU-side scripts/physics/scene work, not GPU), where state is persisted (.godot/godotwright/perf/), and the precise failure condition (error when p95 exceeds budget or is >10% worse than last run) — all consistent with readOnlyHint=false, since baseline files are written. This goes well beyond what the annotations convey.

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 core measurement scope is front-loaded and every sentence carries information, but the opening sentence is a long comma-spliced run-on that forces the reader to parse several distinct facts at once. Tightening it into shorter clauses would improve scanning without losing 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?

With no output schema, the description shoulders the full burden and does so — it describes the return payload (percentiles, per-frame deltas, node counts, named lessons) and error semantics. Combined with the annotation-declared write of baseline state, an agent has everything needed to invoke and interpret it.

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 the baseline is 3, but the description adds real meaning: `input` is clarified as a played timeline equivalent to godot_play, `budget_ms` is tied to the error threshold, and `baseline` persistence is explained. Remaining params (frames, warmup, timeout_seconds) are left to the schema.

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 (run + measure) and resource (a scene), and enumerates exactly what is measured: frame-time p50/p95/p99/max, physics step isolation, slowest-frame attribution, node/orphan counts, and delta vs the last run. It also distinguishes itself from the sibling godot_play by noting that `input` 'plays a timeline as godot_play does' and that godot_play is the tool for interactive play.

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 clear context for use: 'Measure before and after every performance change' and 'to measure while something happens' via the input timeline. It does not explicitly state when NOT to use it (e.g. use godot_test for correctness, godot_play for interactive runs), so exclusions are only implied.

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