Skip to main content
Glama

profiler

Read-onlyIdempotent

Profile Godot projects in real time to capture FPS, memory, draw calls, physics stats, and frame-level data, including percentiles and memory leak detection.

Instructions

性能分析工具。snapshot: 快照(FPS/内存/绘制调用/物理统计)。start/stop: 开始/停止分析会话。get_data: 收集帧级数据,含多维度采样、p99百分位、趋势退化检测、内存趋势、渲染统计。get_active_processes: 遍历场景树查找有 _process/_physics_process 的节点。get_signal_connections: 列出子树所有信号连接。运行时操作,仅影响当前执行上下文。如需持久化,请编辑 .tscn 文件。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNocapture_functions: 返回热点行数(默认 20,上限 100,按 sort 排序)
sortNocapture_functions: 排序键(selfMs|totalMs|calls,默认 selfMs)
actionYes操作类型。capture_functions(P2,2026-09-11):函数级热点——需先 run_project(profiling=true) 起 spawn 会话,一次调用完成采样窗口+排名(引擎原生 profiler 流,等价编辑器 Profiler 面板;帧级 get_data 之外的函数级 self/total 热点+最慢帧 top30)
secondsNocapture_functions: 采样窗口秒数(默认 3,上限 60;窗口从首帧真实数据起算,自动停)
node_pathNo子树根节点路径(get_active_processes/get_signal_connections,默认 root)
dimensionsNo采样维度列表(get_data,默认 ["process"])。有效值: process, physics, nav_process
target_fpsNo目标帧率,用于帧预算分析(get_data,默认 60)
frame_countNo采样帧数(get_data,默认 60)
project_pathNoGodot 项目目录路径(可选,默认使用 GODOT_PROJECT_PATH 环境变量或当前目录)
capture_limitNocapture_functions: 引擎每帧行数上限(默认 256,范围 16-512;越大覆盖函数越多开销越高)
load_autoloadsNo是否加载 Autoload 上下文(默认 true)
leak_threshold_mbNo内存泄漏嫌疑阈值 MB(get_data,默认 2.0)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.33.1
    • changedInput schema / properties / action / description
      Previous value: -"操作类型"New value: +"操作类型。capture_functions(P2,2026-09-11):函数级热点——需先 run_project(profiling=true) 起 spawn 会话,一次调用完成采样窗口+排名(引擎原生 profiler 流,等价编辑器 Profiler 面板;帧级 get_data 之外的函数级 self/total 热点+最慢帧 top30)"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "snapshot",
      -  "start",
      -  "stop",
      -  "get_data",
      -  "get_active_processes",
      -  "get_signal_connections"
      -]New value: +[
      +  "snapshot",
      +  "start",
      +  "stop",
      +  "get_data",
      +  "get_active_processes",
      +  "get_signal_connections",
      +  "capture_functions"
      +]
    • addedInput schema / properties / capture_limit
      Added value: +{
      +  "description": "capture_functions: 引擎每帧行数上限(默认 256,范围 16-512;越大覆盖函数越多开销越高)",
      +  "type": "number"
      +}
    • addedInput schema / properties / seconds
      Added value: +{
      +  "description": "capture_functions: 采样窗口秒数(默认 3,上限 60;窗口从首帧真实数据起算,自动停)",
      +  "type": "number"
      +}
    • addedInput schema / properties / sort
      Added value: +{
      +  "description": "capture_functions: 排序键(selfMs|totalMs|calls,默认 selfMs)",
      +  "type": "string"
      +}
    • addedInput schema / properties / top
      Added value: +{
      +  "description": "capture_functions: 返回热点行数(默认 20,上限 100,按 sort 排序)",
      +  "type": "number"
      +}
  2. First observedv0.25.7

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds complementary behavioral scope — operations are runtime-only, affect only the current execution context, and are not persisted — which is consistent with and goes beyond the annotations. The schema also discloses capture_functions' sampling-window and overhead behavior, and there is no contradiction.

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 description is a single dense mode-keyed paragraph that front-loads the tool identity and keeps nearly every sentence informative — there is little filler. Its structure is efficient but slightly run-on; line breaks per mode would improve scannability.

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

Completeness3/5

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

For a 12-parameter, 7-action tool with no output schema, the description summarizes each mode's outputs only at a high level and omits return formats for most actions (notably start/stop) and prerequisites that apply globally. The schema fully compensates for parameters and partially for capture_functions, but the prose leaves functional gaps that an agent would need to ask about.

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 description coverage is 100%, establishing a baseline of 3. The description earns credit above baseline by giving the central `action` enum real semantics — it explains what snapshot returns (FPS/memory/draw calls/physics stats) and what get_data includes (multi-dimensional sampling, p99, trend regression, memory trends), meaning that is absent from the bare enum labels. The prose adds meaning the schema alone does not convey.

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?

The description identifies the tool as a performance analysis tool and enumerates distinct sub-operations (snapshot, start/stop sessions, get_data with p99/trend detection, process and signal discovery). The specific metrics (FPS, memory, draw calls, physics stats) make the resource clearly distinguishable from siblings like screenshot or scene. Not a 5 because the lead statement is a generic label and the capture_functions mode present in the schema enum is absent from the prose list.

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?

The description provides one genuine exclusion: it states these are runtime operations affecting only the current execution context, and directs persistence work to editing .tscn files. The schema's action description for capture_functions additionally states a prerequisite (run_project with profiling=true). However, it never names alternatives among siblings (e.g., analysis) nor guides the agent on when to choose snapshot vs get_data vs start/stop.

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