Skip to main content
Glama

profile_project

Capture Godot Profiler function timings for a running game to find hot functions and frame-budget overruns. Requires profiling enabled at launch; blocks for the set duration.

Instructions

Capture a window of Godot's function profiler - the editor's Profiler tab numbers. Requires run_project with profiling: true. Blocks for seconds (default 5). Times are elapsed, not CPU; inclusive rows overlap - never sum totalMs. Returns: rows (function, file, line, calls, selfMs/totalMs, per-frame averages, percentOfFrame, peak), the frame budget, servers, worstFrame, plus frames/frameGaps/limitReached for capture quality. Errors if profiling was off at launch or a capture is already open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoHow many functions to return, 1..100 (default: 20).
sortNoRank by own time ("selfMs", default), inclusive time ("totalMs"), or invocation count ("calls").
secondsNoCapture duration in seconds, greater than 0 and at most 60 (default: 5).
captureLimitNoRows the engine puts in each frame packet, 16..512 (default: 512). Godot selects them by inclusive time, so a lower limit hides cheap functions and sets limitReached.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNo
sortNo
frameNo
framesNo
secondsNo
serversNo
frameGapsNo
lastFrameNo
firstFrameNo
worstFrameNo
captureLimitNo
limitReachedNo
framesReceivedNo
functionsReceivedNo
undecodablePacketsNo
unresolvedFunctionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.4.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false) by disclosing blocking behavior ("Blocks for `seconds`"), the default capture length, error preconditions, and a crucial measurement caveat: times are elapsed not CPU and inclusive rows overlap so totalMs must never be summed.

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?

Dense but front-loaded: purpose, prerequisite, blocking duration, and the key measurement warning come first, with return details last. It is long for a single paragraph but nearly every clause carries operational information.

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?

Even though an output schema exists, the description summarizes the return payload (rows, frame budget, servers, worstFrame, frames/frameGaps/limitReached) and flags interpretation pitfalls, so an agent has everything needed to call and read the result correctly.

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 schema already documents all four parameters; the baseline would be 3. The description adds genuine meaning on top by explaining that `seconds` is a blocking capture window and that `captureLimit` causes Godot to select rows by inclusive time, hiding cheap functions and setting limitReached.

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?

The description names a specific verb+resource: "Capture a window of Godot's function profiler - the editor's Profiler tab numbers." It clearly differentiates this sampling tool from the start_profiler/stop_profiler siblings by describing a bounded capture window with returned data.

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 states the prerequisite explicitly ("Requires run_project with profiling: true") and gives failure conditions ("Errors if profiling was off at launch or a capture is already open"), which is strong when-to-use guidance. It does not explicitly contrast with start_profiler/stop_profiler, so it stops short of a 5.

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