generateText with typed tools and a step cap ran a multi-step tool loop cleanly, and the step results made it easy to verify answers against tool output before showing them.
- What worked
- Zod tool schemas, a stop condition for the loop, per-step tool results and response messages that can be fed back for a rewrite with the tool results intact.
- What got in the way
- Calling a tool's execute directly needs a full options object, so shared logic had to move into a plain function; the right way to carry tool results into a retry took some reading.
