ToolCallMessageBuilder

Builder for creating Message.Tool.Call instances from Java code.

Usage from Java:

Message.Tool.Call message = MessageBuilder.toolCall()
.id("call_123")
.tool("search")
.content("{\"query\": \"hello\"}")
.build();

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Adds a text content part to the message.

Link copied to clipboard

Builds a new Message.Tool.Call instance.

Link copied to clipboard

Sets a single text content for the message, replacing any previously added parts.

Link copied to clipboard

Sets the tool call ID.

Link copied to clipboard

Sets the input token count.

Link copied to clipboard

Sets the metadata.

Link copied to clipboard

Sets the output token count.

Link copied to clipboard

Sets the timestamp using java.time.Instant.

Sets the timestamp using kotlin.time.Instant.

Link copied to clipboard

Sets the tool name.

Link copied to clipboard

Sets the total token count.