copyWithTools

Creates a new instance of AIAgentContext with an updated list of tools, replacing the current tools in the LLM context with the provided list.

Return

A new instance of AIAgentContext with the updated tools configuration.

Parameters

tools

The new list of tools to be used in the LLM context, represented as ToolDescriptor objects.