Read here to get started, and find examples
github.com/skymen/editor_tools/blob/main/API_DOCUMENTATION.md
This also needs the window manager addon to work:
construct.net/en/make-games/addons/1534/editor-window-manager