import type { GodotRunner } from '../utils/godot-runner.js'; import type { HandlerResult, OperationParams } from '../mcp.types.js'; import { type ProfileSort } from '../utils/profiler.js'; export declare const profilerToolDefinitions: readonly [{ readonly name: "profile_project"; readonly description: "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."; readonly annotations: { readonly readOnlyHint: false; readonly destructiveHint: false; }; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly seconds: { readonly type: "number"; readonly description: "Capture duration in seconds, greater than 0 and at most 60 (default: 5)."; }; readonly top: { readonly type: "number"; readonly description: "How many functions to return, 1..100 (default: 20)."; }; readonly sort: { readonly type: "string"; readonly enum: readonly ProfileSort[]; readonly description: "Rank by own time (\"selfMs\", default), inclusive time (\"totalMs\"), or invocation count (\"calls\")."; }; readonly captureLimit: { readonly type: "number"; readonly description: "Rows 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."; }; }; readonly required: readonly []; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly seconds: { readonly type: "number"; }; readonly frames: { readonly type: "number"; }; readonly framesReceived: { readonly type: "number"; }; readonly firstFrame: { readonly type: readonly ["number", "null"]; }; readonly lastFrame: { readonly type: readonly ["number", "null"]; }; readonly frameGaps: { readonly type: "number"; }; readonly undecodablePackets: { readonly type: "number"; }; readonly captureLimit: { readonly type: "number"; }; readonly limitReached: { readonly type: "boolean"; }; readonly sort: { readonly type: "string"; readonly enum: readonly ProfileSort[]; }; readonly functionsReceived: { readonly type: "number"; }; readonly unresolvedFunctions: { readonly type: "number"; }; readonly frame: { readonly type: "object"; readonly properties: { readonly frameMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; readonly processMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; readonly physicsMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; readonly physicsFrameMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; readonly scriptMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; }; }; readonly servers: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; }; readonly msPerFrame: { readonly type: "number"; }; readonly functions: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; }; readonly msPerFrame: { readonly type: "number"; }; }; }; }; }; }; }; readonly rows: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly signature: { readonly type: "string"; }; readonly function: { readonly type: "string"; }; readonly file: { readonly type: "string"; }; readonly line: { readonly type: "number"; }; readonly sourceResolved: { readonly type: "boolean"; }; readonly calls: { readonly type: "number"; }; readonly selfMs: { readonly type: "number"; }; readonly totalMs: { readonly type: "number"; }; readonly callsPerFrame: { readonly type: "number"; }; readonly selfMsPerFrame: { readonly type: "number"; }; readonly totalMsPerFrame: { readonly type: "number"; }; readonly msPerCall: { readonly type: "number"; }; readonly percentOfFrame: { readonly type: "number"; }; readonly peak: { readonly type: readonly ["object", "null"]; readonly properties: { readonly frame: { readonly type: "number"; }; readonly calls: { readonly type: "number"; }; readonly selfMs: { readonly type: "number"; }; readonly totalMs: { readonly type: "number"; }; }; }; }; }; }; readonly worstFrame: { readonly type: readonly ["object", "null"]; }; }; }; }, { readonly name: "start_profiler"; readonly description: "Start a profiler capture and return immediately, so simulate_input, run_script and screenshots can drive the game while it records. Requires run_project with profiling: true. Stops itself after `seconds` (default 30, max 60); call stop_profiler for the results. Returns: active, firstFrame, captureLimit, maxSeconds. Use profile_project instead for an unattended window. Errors if a capture is already running or profiling was not enabled at launch."; readonly annotations: { readonly readOnlyHint: false; readonly destructiveHint: false; }; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly seconds: { readonly type: "number"; readonly description: "Maximum capture duration before the automatic stop, greater than 0 and at most 60 (default: 30)."; }; readonly captureLimit: { readonly type: "number"; readonly description: "Rows 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."; }; }; readonly required: readonly []; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly active: { readonly type: "boolean"; }; readonly maxSeconds: { readonly type: "number"; }; readonly firstFrame: { readonly type: readonly ["number", "null"]; }; readonly captureLimit: { readonly type: "number"; }; }; }; }, { readonly name: "stop_profiler"; readonly description: "Stop the capture started by start_profiler and rank the recorded functions; a capture that already hit its time limit is read back as-is, and can be re-read with a different sort. Times are elapsed, not CPU; inclusive rows overlap - never sum totalMs. Returns: the same payload as profile_project - rows (file, line, function, calls, selfMs/totalMs, per-frame averages, percentOfFrame, peak frame), frame budget, servers, worstFrame, frames, frameGaps, limitReached. Errors if no capture was started."; readonly annotations: { readonly readOnlyHint: false; readonly destructiveHint: false; }; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly top: { readonly type: "number"; readonly description: "How many functions to return, 1..100 (default: 20)."; }; readonly sort: { readonly type: "string"; readonly enum: readonly ProfileSort[]; readonly description: "Rank by own time (\"selfMs\", default), inclusive time (\"totalMs\"), or invocation count (\"calls\")."; }; }; readonly required: readonly []; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly seconds: { readonly type: "number"; }; readonly frames: { readonly type: "number"; }; readonly framesReceived: { readonly type: "number"; }; readonly firstFrame: { readonly type: readonly ["number", "null"]; }; readonly lastFrame: { readonly type: readonly ["number", "null"]; }; readonly frameGaps: { readonly type: "number"; }; readonly undecodablePackets: { readonly type: "number"; }; readonly captureLimit: { readonly type: "number"; }; readonly limitReached: { readonly type: "boolean"; }; readonly sort: { readonly type: "string"; readonly enum: readonly ProfileSort[]; }; readonly functionsReceived: { readonly type: "number"; }; readonly unresolvedFunctions: { readonly type: "number"; }; readonly frame: { readonly type: "object"; readonly properties: { readonly frameMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; readonly processMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; readonly physicsMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; readonly physicsFrameMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; readonly scriptMs: { readonly type: "object"; readonly properties: { readonly avg: { readonly type: "number"; }; readonly max: { readonly type: "number"; }; }; }; }; }; readonly servers: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; }; readonly msPerFrame: { readonly type: "number"; }; readonly functions: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; }; readonly msPerFrame: { readonly type: "number"; }; }; }; }; }; }; }; readonly rows: { readonly type: "array"; readonly items: { readonly type: "object"; readonly properties: { readonly signature: { readonly type: "string"; }; readonly function: { readonly type: "string"; }; readonly file: { readonly type: "string"; }; readonly line: { readonly type: "number"; }; readonly sourceResolved: { readonly type: "boolean"; }; readonly calls: { readonly type: "number"; }; readonly selfMs: { readonly type: "number"; }; readonly totalMs: { readonly type: "number"; }; readonly callsPerFrame: { readonly type: "number"; }; readonly selfMsPerFrame: { readonly type: "number"; }; readonly totalMsPerFrame: { readonly type: "number"; }; readonly msPerCall: { readonly type: "number"; }; readonly percentOfFrame: { readonly type: "number"; }; readonly peak: { readonly type: readonly ["object", "null"]; readonly properties: { readonly frame: { readonly type: "number"; }; readonly calls: { readonly type: "number"; }; readonly selfMs: { readonly type: "number"; }; readonly totalMs: { readonly type: "number"; }; }; }; }; }; }; readonly worstFrame: { readonly type: readonly ["object", "null"]; }; }; }; }]; export declare function handleProfileProject(runner: GodotRunner, args: OperationParams): Promise; export declare function handleStartProfiler(runner: GodotRunner, args: OperationParams): Promise; export declare function handleStopProfiler(runner: GodotRunner, args: OperationParams): Promise; //# sourceMappingURL=profiler-tools.d.ts.map