ToolResultMessageBuilder

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

Usage from Java:

Message.Tool.Result message = MessageBuilder.toolResult()
.id("call_123")
.tool("search")
.content("Found 5 results")
.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.Result 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 result ID.

Link copied to clipboard

Sets the metadata.

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.