FWIW, doing it as a special code block would align with how Obsidian handles stuff like that from its extensions.
For example, ```tasks blocks are used in Obsidian Tasks to denote queries. The extension replaces the block with the rendered task list, when in wysiwyg editing or in the rendered view.
In your case the results would just appear, a la soulver, but the way of setting it up would be familiar.
I've been thinking about making math an option within markdown.
The type of the block is shown at the bottom, in the status bar.