Post

Spring AI 2.0 moved the tool calling loop into the advisor chain. That means you can hook into it and watch it run. I built a streaming chat where every tool call shows up live as a pill, "Calling getWeatherForecast...", using one small custom advisor. github.com/danvega/tool...

0 reposts4 likes

That hook is also the cheapest place to catch a lying tool. Over 962 runs on one source ours kept reporting success while the payload reshaped underneath: right status, right field names, wrong content. If the advisor can see the result, it can assert the shape there, not just that a call happened.

Showing the call live is useful; showing its terminal state is better. The pill should end as succeeded, denied, failed, or timed out, with the arguments and result available without dumping them into the chat.