ToolCall

represents a tool invocation from the model.

  • id: the provider-assigned call ID (used to correlate results back). Empty for Gemini, which doesn't use call IDs.
  • name: the tool name the model is calling
  • arguments: the JSON-encoded argument object as a string

arguments

instantiate

(Fn [(Ref ToolCall a)] (Ref String a))

gets the arguments property of a ToolCall.

copy

instantiate

(Fn [(Ref ToolCall a)] ToolCall)

copies a ToolCall.

delete

instantiate

(Fn [ToolCall] ())

deletes a ToolCall. Should usually not be called manually.

id

instantiate

(Fn [(Ref ToolCall a)] (Ref String a))

gets the id property of a ToolCall.

init

instantiate

(Fn [String, String, String] ToolCall)

creates a ToolCall.

name

instantiate

(Fn [(Ref ToolCall a)] (Ref String a))

gets the name property of a ToolCall.

prn

instantiate

(Fn [(Ref ToolCall a)] String)

converts a ToolCall to a string.

set-arguments

instantiate

(Fn [ToolCall, String] ToolCall)

sets the arguments property of a ToolCall.

set-arguments!

instantiate

(Fn [(Ref ToolCall a), String] ())

sets the arguments property of a ToolCall in place.

set-id

instantiate

(Fn [ToolCall, String] ToolCall)

sets the id property of a ToolCall.

set-id!

instantiate

(Fn [(Ref ToolCall a), String] ())

sets the id property of a ToolCall in place.

set-name

instantiate

(Fn [ToolCall, String] ToolCall)

sets the name property of a ToolCall.

set-name!

instantiate

(Fn [(Ref ToolCall a), String] ())

sets the name property of a ToolCall in place.

str

instantiate

(Fn [(Ref ToolCall a)] String)

converts a ToolCall to a string.

update-arguments

instantiate

(Fn [ToolCall, (Ref (Fn [String] String a) b)] ToolCall)

updates the arguments property of a ToolCall using a function f.

update-id

instantiate

(Fn [ToolCall, (Ref (Fn [String] String a) b)] ToolCall)

updates the id property of a ToolCall using a function f.

update-name

instantiate

(Fn [ToolCall, (Ref (Fn [String] String a) b)] ToolCall)

updates the name property of a ToolCall using a function f.