Are we reinventing RPC again? Calling CLI program with JSON sounds like RPC call. The schema feels likes something LSP can provided for such function.

Maybe asking agent to write/execute code that wraps CLI is a better solution.

Confused? You won't be, after this week's episode of https://en.wikipedia.org/wiki/SOAP.

Everything old is new again...

Doesn't powershell have structured input and output?