add_script_export
Add @export annotations to GDScript variables, making them configurable in the Godot Inspector. Accepts optional type hints, export hints, and default values for precise editor control.
Instructions
Add @export variable to GDScript.
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": {
"path": "<path>",
"var_name": "<var_name>"
},
"name": "add_script_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to .gd script file | |
| var_name | Yes | Variable name | |
| var_type | No | Type hint | |
| export_hint | No | Export hint (e.g. "int, 0, 100") | |
| default_value | No | Default value |