ToolCall

org.llm4s.llmconnect.model.ToolCall
See theToolCall companion object
case class ToolCall(id: String, name: String, arguments: Value)

A single tool invocation requested by the LLM.

The LLM generates id to correlate this request with its ToolMessage response; the agent framework forwards id unchanged when constructing ToolMessage values, so do not modify it.

arguments is a parsed ujson.Value (typically a JSON object), not a raw string. Use arguments.obj to access fields or pass it directly to org.llm4s.toolapi.ToolRegistry.execute via a org.llm4s.toolapi.ToolCallRequest.

Value parameters

arguments

Parsed JSON arguments; the schema is defined by the tool's org.llm4s.toolapi.Schema.

id

Provider-generated identifier; matched by the corresponding ToolMessage.toolCallId.

name

Name of the tool to invoke; must match a registered org.llm4s.toolapi.ToolFunction.

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

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product