interceptToolCall

fun <TFeature : Any> interceptToolCall(interceptContext: InterceptContext<TFeature>, handle: suspend TFeature.(eventContext: ToolCallContext) -> Unit)(source)

Intercepts and handles tool calls for the specified feature and its implementation. Updates the tool call handler for the given feature key with a custom handler.

Parameters

handle

A suspend lambda function that processes tool calls, taking the tool, and its arguments as parameters.

Example:

pipeline.interceptToolCall(InterceptContext) { eventContext ->
// Process or log the tool call
}