How AI tool calling works (40 lines of vanilla JavaScript) | CodexMaster