Can I make a mod that lets me build structures with just a chat command?
Try Tynker's Mods Editor (Project > Create Project > Minecraft > Create Mod).
https://www.tynker.com/dashboard/student/#/minecraft/mod/bedrock
Then experiment with Tynkerbot's building commands:
Tynkerbot can place blocks individually. And that can be a great way to create truly advanced structures. But first, check out Utilities, they’re an easy way to build house shapes quickly using Tynkerbot. The above command will instantly build a hollow box made of log blocks, which can be the dwelling space for your cabin! Simply decorate it with a cascading roof, a front porch, and a chimney, and you're ready for a cozy winter atop a snowy hillside!
Here are some ideas:
Use a hemisphere (half a sphere) to build an igloo using snow — or a Thunderdome-style fighting cage using fences!
Try prisms, lines, stairs, and other shapes, too!
Read this article for more details: "Create a Minecraft House with Tynker Code."