Shared tool result formatting.
@type t() :: {:ok, term()} | {:error, term()}
@spec run((-> t() | term())) :: t()