def structured
import ezmcp@0.1.0.0/src/server.bend as Serverimport Base
import emerging-ezjson@1.2.0.0/main.bend as Json
import emerging-ezjson@1.2.0.0/src/value.bend as Value
462# a tool result with structured content, and its JSON text as a text block
463def structured(+val: Value.Json, bad: Bool) -> Value.Json:
464 Json.obj([("content", Json.arr([text(Json.print(val))])),
465 ("structuredContent", val), ("isError", Json.bool(bad))])