Tool

sealed interface Tool : MessagePart(source)

Represents messages exchanged with tools, either as calls or results.

Inheritors

Types

Link copied to clipboard
data class Call @JvmOverloads constructor(val id: String? = null, val tool: String, val args: String) : MessagePart.Tool, MessagePart.ResponsePart

Represents a tool call message sent as a response.

Link copied to clipboard
data class Result @JvmOverloads constructor(val id: String? = null, val tool: String, val output: String, val isError: Boolean = false) : MessagePart.Tool, MessagePart.RequestPart

Represents the result of a tool call sent as a request.

Properties

Link copied to clipboard
abstract val tool: String

The name of the tool used.