chat({ tools }) from
@tanstack/ai, with the same tools, presets, approval flags, scope guard,
and override rules as createChatTools from chat/ai.
Requires zod 4.2 or newer for the input schemas. needsApproval: true
makes TanStack pause the run with a tool-approval interrupt; a server-side
bot has to resume that run itself (see the TanStack AI docs on tool
approval), so most bots pass requireApproval: false or handle approval
before calling chat().
Parameters
required
Returns
TanStackTool