ToolCallInfo

org.llm4s.toolapi.ToolCallInfo
See theToolCallInfo companion object
@Stable
final case class ToolCallInfo

The tool call a ToolFunction handler is running, when its caller knows it: read as SafeParameterExtractor.call. An agent supplies it for every call it runs; plain ToolRegistry tool calling, outside an agent, has no call to describe and leaves it None.

A tool with an external side effect passes idempotencyKey to the system it calls (an Idempotency-Key header, a client token, a unique column), because an agent may run the same call more than once - a retrying middleware, recover after a failure or crash, an approval - and it is the same in every run of one call. The runtime runs a tool at least once, never exactly once; the key de-duplicates only where the external system honours it.

Growth-prone: build it with ToolCallInfo(...) and change it with the with* setters.

Value parameters

idempotencyKey

the same in every run of this call, and different for every other call

toolCallId

the id the model gave the call

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withIdempotencyKey(idempotencyKey: String): ToolCallInfo
def withToolCallId(toolCallId: String): ToolCallInfo

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product