runtime_eval
Evaluate expressions in a running Godot game without breakpoints to inspect values, call methods, or access nodes, autoloads, and singletons; returns the value or engine error.
Instructions
Evaluate an expression in a running game, while it runs - no breakpoint needed. Uses Godot's Expression: calls, operators, member access and constructors, no statements or assignment. Names available: the base node's members (default the current scene), autoloads, engine singletons such as Input, and class_name globals. Calls run for real and may change the game. Returns: the value, or the engine's error text.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expression": "<expression>"
},
"name": "runtime_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node | No | Base node path for member lookups (default: current scene) | |
| expression | Yes | e.g. get_tree().get_nodes_in_group("enemies").size() | |
| session_id | No | Session from runtime_run. Required only when several games run. |