Are you talking about https://docs.godotengine.org/en/latest/tutorials/scripting/gdscript/gdscript_basics.html#tool-mode and thus https://docs.godotengine.org/en/latest/tutorials/plugins/running_code_in_the_editor.html#doc-running-code-in-the-editor ?
Godot Engine documentation
What is@tool?:@tool is a powerful line of code that, when added at the top of your script, makes it execute in the editor. You can also decide which parts of the script execute in the editor, which...
Godot Engine documentation
GDScript is a high-level, object-oriented, imperative, and gradually typed programming language built for Godot. GDScript is a high-level, dynamically typed programming language used to create cont...