Interface ToolAdvisor


public interface ToolAdvisor
Filter chain around every tool invocation.

The runtime walks all ToolAdvisor beans (in order() order) wrapped around a single tool call: each advisor sees the ToolAdvisor.Invocation on the way in and the ToolAdvisor.Result on the way out, and may mutate either. Calling chain.proceed(inv) runs the next advisor down — or, at the tail, the actual Tool.execute(Map).

Typical uses:

An advisor that doesn't apply to the current call is skipped entirely. Throwing from around(ai.mindconnect.agent.tool.ToolAdvisor.Invocation, ai.mindconnect.agent.tool.ToolAdvisor.Chain) is propagated to the runtime's standard tool-failure path (no extra try/catch in advisor code).