onToolCallCompleted

suspend fun onToolCallCompleted(eventId: String, executionInfo: AgentExecutionInfo, runId: String, toolCallId: String?, toolName: String, toolDescription: String?, toolArgs: JsonObject, toolResult: JsonElement?, context: AIAgentContext)(source)

Notifies all registered tool handlers about the result of a tool call.

Parameters

eventId

The unique identifier for the event group.

executionInfo

The execution information for the tool call agent event

runId

The unique identifier for the current run;

toolCallId

The unique identifier for the current tool call;

toolName

The tool name that was called;

toolDescription

The description of the tool that was called;

toolArgs

The arguments that were provided to the tool;

toolResult

The result produced by the tool, or null if no result was produced;

context

The AI agent context associated with the tool call.