Creating tools in GeoGebra is somewhat like coding. You construct once a figure , record the steps of construction. Then you can use your construction several times starting with a few basic points clicking on the tool button and autonomously the figure is constructed.
In this tutorial I like t show you how it works (my english pronounciation is ugly) and I hope that you understand the steps to create your own tool!