evaluate_expression
Evaluate GDScript expressions directly in the Godot editor or a running game to test code logic and inspect values.
Instructions
Evaluate a GDScript expression in the editor or running game context
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": "evaluate_expression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | Context to evaluate in (default: editor) | editor |
| expression | Yes | GDScript expression to evaluate |