how do datapacks make chat menus?

Im making a datapack for building with tools n such but using /function is too cluttered n stuff especially with my other food datapack that has a lot of give and floor crafting functions so i wanna make a chat menu that lets you select a tool to use by clicking it and its size
Continue to help post