Leveraging godot for procedual generation?

Hello, I’ve been wondering about ways to use godot features for procedual generation. Usually in tutorials there are level scenes and you have a convenient preview in the editor, but is it possible to do it for generated stuff? I know it’s possible to run some game code in the editor.

To run code in the editor you have to write a @tool script. there are a bunch of tutorials on youtube

I know about @tool, but I can’t find any examples on generating levels (tilemap for example) with it.

You technically just have to run a procedural generation when something is triggered through the @tool-script

Yes, that’s it. I was hoping for some examples, googling didn’t yield anything.