After Tool Call Context
data class AfterToolCallContext(val toolCall: ToolCall, val result: Tool.Result, val resultAsString: String, val durationMs: Long) : ToolResultContext
Context provided after tool execution.
Lightweight context without conversation history or iteration state. Used in both streaming and non-streaming modes.
Implements ToolResultContext for shared access to tool result fields. Check result type to determine success (Tool.Result.Text, Tool.Result.WithArtifact) or failure (Tool.Result.Error).
Properties
Link copied to clipboard
Execution duration in milliseconds
Link copied to clipboard
The typed tool result (may be Tool.Result.Error on failure)
Link copied to clipboard
String representation of the result