Module Content_block.Tool_use

Tool invocation requests from the assistant.

type t

The type of tool use blocks.

val jsont : t Jsont.t

jsont is the Jsont codec for tool use blocks. Use Jsont.Json.encode jsont and Jsont.Json.decode jsont for serialization. Use Jsont.pp_value jsont () for pretty-printing.

val create : id:string -> name:string -> input:Jsont.json -> t

create ~id ~name ~input creates a new tool use block.

  • parameter id

    Unique identifier for this tool invocation

  • parameter name

    Name of the tool to invoke

  • parameter input

    Parameters for the tool as raw JSON

val id : t -> string

id t returns the unique identifier of the tool use.

val name : t -> string

name t returns the name of the tool being invoked.

val input : t -> Jsont.json

input t returns the input parameters for the tool as raw JSON.

val unknown : t -> Unknown.t

unknown t returns any unknown fields from JSON parsing.