Content_block.Tool_resultResults from tool invocations.
jsont is the Jsont codec for tool result blocks. Use Jsont.Json.encode jsont and Jsont.Json.decode jsont for serialization. Use Jsont.pp_value jsont () for pretty-printing.
val create :
tool_use_id:string ->
?content:Jsont.json ->
?is_error:bool ->
unit ->
tcreate ~tool_use_id ?content ?is_error () creates a new tool result block.
val tool_use_id : t -> stringtool_use_id t returns the ID of the corresponding tool use.
val content : t -> Jsont.json optioncontent t returns the optional result content as raw JSON.
val is_error : t -> bool optionis_error t returns whether this result represents an error.