runner->run('search_content', get_defined_vars(), function () use ($query, $type, $site, $limit): array { if ('' === trim($query)) { throw new ToolCallException('query must not be empty.'); } return ['results' => $this->search->search($query, $type, $site, max(1, min(8, $limit ?? 5)))]; }); } }