3.1.0
Tool approval callback receives an instance of tool:
new ToolApproval(
tools: [
// Enable tool approval based on custom rules
BuyTicketTool::class => function (ToolInterface $tool): bool {
return $tool->getInput('amount') > 100;
}
]
)